8313307: java/util/Formatter/Padding.java fails on some Locales

Reviewed-by: jlu, naoto
This commit is contained in:
Aleksey Shipilev 2023-07-31 08:35:31 +00:00
parent 6fca289887
commit 408987e1ca

View File

@ -29,6 +29,8 @@
* @run junit Padding
*/
import java.util.Locale;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
@ -307,7 +309,7 @@ public class Padding {
@ParameterizedTest
@MethodSource
void padding(String expected, String format, Object value) {
assertEquals(expected, String.format(format, value));
assertEquals(expected, String.format(Locale.US, format, value));
}
}