RFR: 8372844: Improve usage of test/jdk/java/text/testlib/TestUtils.java locale methods [v2]
Justin Lu
jlu at openjdk.org
Tue Dec 2 19:14:02 UTC 2025
> This PR updates the call sites of `TestUtils::usesGregorianCalendar`, `TestUtils::usesAsciiDigits`, and `TestUtils::hasSpecialVariant` to use `Assumptions` to properly abort the test.
>
> The existing usage of these methods involve printing to output and returning when locale conditions are not met. Some of these tests do lots of printing, so identifying when a test is skipped due to inadequate locale conditions may not be obvious. Instead of simply printing to output, it would be better for test diagnostics to abort the tests, which is easy to identify in the Jtreg output. E.g.
>
>> [ JUnit Tests: found 1189, started 1189, succeeded 1185, failed 0, aborted 4, skipped 0]
>
> As a result of this change, Bug4407042, Bug4845901, Bug6530336, and LocaleCategory were converted to JUnit based tests. (I could have decided to throw jtreg.SkippedException for those tests, but decided to just convert as well.)
Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
Reflect Naoto's comments
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28590/files
- new: https://git.openjdk.org/jdk/pull/28590/files/6de6b7fa..ed9f1ba7
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28590&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28590&range=00-01
Stats: 4 lines in 2 files changed: 0 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/28590.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28590/head:pull/28590
PR: https://git.openjdk.org/jdk/pull/28590
More information about the core-libs-dev
mailing list