Cleanup for EnumsTest and EnumsWithNameObfuscationTest suites, make sure they always run with correct configuration property
Review at http://gwt-code-reviews.appspot.com/1018801
Review by: cromwellian@google.com
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@9165 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/test/com/google/gwt/dev/jjs/EnumsSuite.gwt.xml b/user/test/com/google/gwt/dev/jjs/EnumsSuite.gwt.xml
new file mode 100644
index 0000000..7a51527
--- /dev/null
+++ b/user/test/com/google/gwt/dev/jjs/EnumsSuite.gwt.xml
@@ -0,0 +1,20 @@
+<!-- -->
+<!-- Copyright 2010 Google Inc. -->
+<!-- Licensed under the Apache License, Version 2.0 (the "License"); you -->
+<!-- may not use this file except in compliance with the License. You may -->
+<!-- may obtain a copy of the License at -->
+<!-- -->
+<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
+<!-- -->
+<!-- Unless required by applicable law or agreed to in writing, software -->
+<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
+<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -->
+<!-- implied. License for the specific language governing permissions and -->
+<!-- limitations under the License. -->
+
+<module>
+ <inherits name="com.google.gwt.dev.jjs.CompilerSuite"/>
+
+ <set-configuration-property name="compiler.enum.obfuscate.names"
+ value="false" />
+</module>
diff --git a/user/test/com/google/gwt/dev/jjs/EnumsWithNameObfuscationSuite.gwt.xml b/user/test/com/google/gwt/dev/jjs/EnumsWithNameObfuscationSuite.gwt.xml
index 07b8bc7..71920df 100644
--- a/user/test/com/google/gwt/dev/jjs/EnumsWithNameObfuscationSuite.gwt.xml
+++ b/user/test/com/google/gwt/dev/jjs/EnumsWithNameObfuscationSuite.gwt.xml
@@ -15,5 +15,6 @@
<module>
<inherits name="com.google.gwt.dev.jjs.CompilerSuite"/>
- <set-configuration-property name="compiler.enum.obfuscate.names" value="true" />
+ <set-configuration-property name="compiler.enum.obfuscate.names"
+ value="true" />
</module>
diff --git a/user/test/com/google/gwt/dev/jjs/EnumsWithNameObfuscationSuite.java b/user/test/com/google/gwt/dev/jjs/EnumsWithNameObfuscationSuite.java
deleted file mode 100644
index 8860a49..0000000
--- a/user/test/com/google/gwt/dev/jjs/EnumsWithNameObfuscationSuite.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.dev.jjs;
-
-import com.google.gwt.dev.jjs.test.EnumsWithNameObfuscationTest;
-import com.google.gwt.junit.tools.GWTTestSuite;
-
-import junit.framework.Test;
-
-/**
- * The complete compiler suite.
- */
-public class EnumsWithNameObfuscationSuite {
-
- public static Test suite() {
- GWTTestSuite suite = new GWTTestSuite(
- "Test for com.google.gwt.dev.jjs (with enum name obfuscation)");
-
- // $JUnit-BEGIN$
- suite.addTestSuite(EnumsWithNameObfuscationTest.class);
- // $JUnit-END$
-
- return suite;
- }
-
-}
diff --git a/user/test/com/google/gwt/dev/jjs/test/EnumsTest.java b/user/test/com/google/gwt/dev/jjs/test/EnumsTest.java
index 5eda6ce..f27ddf7 100644
--- a/user/test/com/google/gwt/dev/jjs/test/EnumsTest.java
+++ b/user/test/com/google/gwt/dev/jjs/test/EnumsTest.java
@@ -84,7 +84,7 @@
}
public String getModuleName() {
- return "com.google.gwt.dev.jjs.CompilerSuite";
+ return "com.google.gwt.dev.jjs.EnumsSuite";
}
public void testCompareTo() {
@@ -190,6 +190,7 @@
}
}
+ @SuppressWarnings("unchecked")
public void testValueOf() {
assertEquals(Basic.A, Basic.valueOf("A"));
assertEquals(Basic.B, Basic.valueOf("B"));
diff --git a/user/test/com/google/gwt/dev/jjs/test/EnumsWithNameObfuscationTest.java b/user/test/com/google/gwt/dev/jjs/test/EnumsWithNameObfuscationTest.java
index 936e0b5..44cdb48 100644
--- a/user/test/com/google/gwt/dev/jjs/test/EnumsWithNameObfuscationTest.java
+++ b/user/test/com/google/gwt/dev/jjs/test/EnumsWithNameObfuscationTest.java
@@ -127,6 +127,7 @@
}
@Override
+ @SuppressWarnings("unchecked")
public void testValueOf() {
try {