Repository navigation
Add unit tests for DateFormatPattern - #17873
Conversation
Format a fixed date with each pattern and compare the result with the example given in the pattern's documentation. Signed-off-by: Ruby20-50 <rubamogalli@gmail.com>
| * Nextcloud - Android Client | ||
| * | ||
| * SPDX-FileCopyrightText: 2026 <Ruba Mogalli> <rubamogalli@gmail.com> | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only |
There was a problem hiding this comment.
Hey,
Thank you for the PR. Could you please update license header via AGPL-3.0-or-later?
| } | ||
|
|
||
| @Test | ||
| fun monthWithDate_formatsShortMonthAndDay() { |
There was a problem hiding this comment.
Can we have function name like this: https://kotlinlang.org/docs/coding-conventions.html#names-for-test-methods ?
There was a problem hiding this comment.
I have oriented my code on the second case with the backticks '`'
Thank you for the feedback
Signed-off-by: Ruby20-50 <rubamogalli@gmail.com>
Signed-off-by: Ruby20-50 <rubamogalli@gmail.com>
…y20-50/android into add-date-format-pattern-test
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Adds unit tests for
DateFormatPattern.Each test formats a fixed date (3 August 2024, 14:38, English locale) with one
pattern and checks the result against the example in the pattern's
documentation. The tests are plain JVM unit tests and need no Android SDK.
Run with:
.\gradlew.bat testGplayDebugUnitTest --tests "com.nextcloud.utils.date.DateFormatPatternTest"
🖼️ Screenshots
🏁 Checklist
/backport to stable-xx.x🤖 AI (if applicable)
I wrote and adapted this PR myself, with help from an AI assistant. It
helped review the test, the commit message and explained
the contribution workflow. I initiated the code, ran the tests and the style
checks locally, and fixed problems along the way.