From 23e73f92d741d858f9191318cebcc0214f97f485 Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Mon, 16 Dec 2024 20:32:29 -0600 Subject: [PATCH] Support -strict in test arguments (#10039) We cannot yet enable this for all of GWT's own tests, see #10038 for that followup. That said, that failure confirms that this feature is working as expected. Fixes #10037 --- user/src/com/google/gwt/junit/JUnitShell.java | 2 ++ user/test/com/google/gwt/junit/JUnitShellTest.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/user/src/com/google/gwt/junit/JUnitShell.java b/user/src/com/google/gwt/junit/JUnitShell.java index 53f67a7cb2f..842c1ad9794 100644 --- a/user/src/com/google/gwt/junit/JUnitShell.java +++ b/user/src/com/google/gwt/junit/JUnitShell.java @@ -60,6 +60,7 @@ import com.google.gwt.dev.util.arg.ArgHandlerScriptStyle; import com.google.gwt.dev.util.arg.ArgHandlerSetProperties; import com.google.gwt.dev.util.arg.ArgHandlerSourceLevel; +import com.google.gwt.dev.util.arg.ArgHandlerStrict; import com.google.gwt.dev.util.arg.ArgHandlerWarDir; import com.google.gwt.dev.util.arg.ArgHandlerWorkDirOptional; import com.google.gwt.junit.JUnitMessageQueue.ClientStatus; @@ -299,6 +300,7 @@ public int handle(String[] args, int tagIndex) { registerHandler(new ArgHandlerFilterJsInteropExports(options)); registerHandler(new ArgHandlerSetProperties(options)); registerHandler(new ArgHandlerClosureFormattedOutput(options)); + registerHandler(new ArgHandlerStrict(options)); /* * ----- Options specific to JUnitShell ----- diff --git a/user/test/com/google/gwt/junit/JUnitShellTest.java b/user/test/com/google/gwt/junit/JUnitShellTest.java index e5b8534d6e0..19695aaa89f 100644 --- a/user/test/com/google/gwt/junit/JUnitShellTest.java +++ b/user/test/com/google/gwt/junit/JUnitShellTest.java @@ -45,7 +45,7 @@ public void testDefaultModuleUrl() throws Exception { public void testArgOptimize() throws Exception { parseGoodArgs("-optimize", "8", "-XdisableInlineLiteralParameters", "-XdisableRemoveDuplicateFunctions", "-XdisableClusterSimilarFunctions", - "-XdisableOrdinalizeEnums", "-XdisableOptimizeDataflow"); + "-XdisableOrdinalizeEnums", "-XdisableOptimizeDataflow", "-strict"); } private void parseGoodArgs(String... argsToUse) {