--- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java Fri Oct 18 11:00:57 2019 -0400
+++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java Fri Oct 18 14:14:37 2019 -0400
@@ -45,6 +45,8 @@
final public class TKit {
+ private static final String OS = System.getProperty("os.name").toLowerCase();
+
public static final Path TEST_SRC_ROOT = Functional.identity(() -> {
Path root = Path.of(System.getProperty("test.src"));
@@ -58,6 +60,22 @@
throw new RuntimeException("Failed to locate apps directory");
}).get();
+ public final static String ICON_SUFFIX = Functional.identity(() -> {
+ if (isOSX()) {
+ return ".icns";
+ }
+
+ if (isLinux()) {
+ return ".png";
+ }
+
+ if (isWindows()) {
+ return ".ico";
+ }
+
+ throw throwUnknownPlatformError();
+ }).get();
+
public static void run(String args[], ThrowingRunnable testBody) {
if (currentTest != null) {
throw new IllegalStateException(
@@ -816,6 +834,4 @@
VERBOSE_TEST_SETUP = isNonOf.test(Set.of("init", "i"));
}
}
-
- private static final String OS = System.getProperty("os.name").toLowerCase();
}