RFR: 8159337: Introduce a method in Locale class to return the language tags as per RFC 5646 convention [v3]

Naoto Sato naoto at openjdk.org
Wed May 3 17:01:20 UTC 2023


On Tue, 2 May 2023 21:36:57 GMT, Justin Lu <jlu at openjdk.org> wrote:

>> test/jdk/java/util/Locale/CaseFoldLanguageTagTest.java line 56:
>> 
>>> 54:     @MethodSource("wellFormedTags")
>>> 55:     public void TestWellFormedTags(String tag, String foldedTag) {
>>> 56:         assertEquals(foldedTag, Locale.caseFoldLanguageTag(tag), String.format("Folded %s", tag));
>> 
>> Would it be helpful if both the expected and the result are recorded?
>
> Junit assertEquals provides the actual result in the failure, so no need to record it.
> 
> Example failure:
> `org.opentest4j.AssertionFailedError: Folded ABC ==> expected: <ab> but was: <abc>`

Ah, ok then

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13679#discussion_r1183965230


More information about the core-libs-dev mailing list