On Mon, 1 Dec 2025 23:51:11 GMT, Justin Lu <[email protected]> wrote:

> 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.)

This pull request has now been integrated.

Changeset: c7aa1033
Author:    Justin Lu <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/c7aa10339aa40d37dc52e6dcec102f8dca114634
Stats:     223 lines in 12 files changed: 45 ins; 90 del; 88 mod

8372844: Improve usage of test/jdk/java/text/testlib/TestUtils.java locale 
methods

Reviewed-by: naoto

-------------

PR: https://git.openjdk.org/jdk/pull/28590

Reply via email to