On Fri, 14 Oct 2022 21:48:06 GMT, Naoto Sato <na...@openjdk.org> wrote:
>> Issue: Formatter unit tests are launched via basic.sh >> >> Fix: Replace basic.sh with a Java test launcher >> >> Note: Java.internal.math was included in the original configuration of >> Basic, but I removed it as it was not used within the Basic unit tests >> >> >> Original output on success >> <img >> src="https://user-images.githubusercontent.com/67398801/195936541-bc90db50-8d03-47be-9c4f-95176b19a6a7.png" >> width="350" height="350"> >> >> >> New output on success >> <img >> src="https://user-images.githubusercontent.com/67398801/195936558-f85f4d48-dae2-4c38-aa50-46ef47db3d89.png" >> width="350" height="450"> > > test/jdk/java/util/Formatter/Basic.java line 24: > >> 22: */ >> 23: >> 24: import static java.lang.System.out; > > It's not your change, but probably this does not seem necessary, as `out` > appears only once. Got rid of it! > test/jdk/java/util/Formatter/BasicTestLauncher.java line 48: > >> 46: runFormatterTests(TZ_UP); >> 47: runFormatterTests(TZ_AN); >> 48: } > > Could use testng/junit, instead of normal main. This way both timezones are > guaranteed to be tested. Currently, if an error occurs with `US/Pacific`, > `Asia/Novosibirsk` will not run. Thank you for the catch, replaced with JUnit > test/jdk/java/util/Formatter/BasicTestLauncher.java line 74: > >> 72: throw new RuntimeException(String.format("$$$ Error(s) found >> within %s subprocess: " + >> 73: "%s%n", timeZone, err.getMessage())); >> 74: } > > I'd prefer not to catch an exception (and turn it into `RuntimeException`) > here, as the exception type will be lost. Thank you, separated to distinguish the IO and runtime exceptions ------------- PR: https://git.openjdk.org/jdk/pull/10715