Build fix: SerializableTypeOracleBuilderTest should use all the standard units.

Also some minor related cleanup.

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@5948 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/test/com/google/gwt/dev/javac/MockCompilationUnit.java b/dev/core/test/com/google/gwt/dev/javac/MockCompilationUnit.java
index 7a0b99b..d12e577 100644
--- a/dev/core/test/com/google/gwt/dev/javac/MockCompilationUnit.java
+++ b/dev/core/test/com/google/gwt/dev/javac/MockCompilationUnit.java
@@ -15,6 +15,8 @@
  */
 package com.google.gwt.dev.javac;
 
+import com.google.gwt.dev.util.Name.BinaryName;
+
 public class MockCompilationUnit extends CompilationUnit {
 
   private final String typeName;
@@ -31,7 +33,7 @@
   }
 
   public String getDisplayLocation() {
-    return "/mock/" + getTypeName();
+    return "/mock/" + BinaryName.toInternalName(typeName) + ".java";
   }
 
   @Override
diff --git a/dev/core/test/com/google/gwt/dev/javac/impl/JavaResourceBase.java b/dev/core/test/com/google/gwt/dev/javac/impl/JavaResourceBase.java
index 1da0628..6d85f22 100644
--- a/dev/core/test/com/google/gwt/dev/javac/impl/JavaResourceBase.java
+++ b/dev/core/test/com/google/gwt/dev/javac/impl/JavaResourceBase.java
@@ -95,7 +95,7 @@
       code.append("public class Object {\n");
       code.append("  public String toString() { return \"Object\"; }\n");
       code.append("  public Object clone() { return this; } ");
-      code.append("  public Class getClass() { return Object.class; } ");
+      code.append("  public Class<?> getClass() { return Object.class; } ");
       code.append("}\n");
       return code;
     }
diff --git a/user/test/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilderTest.java b/user/test/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilderTest.java
index 91a12f0..b22f8d1 100644
--- a/user/test/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilderTest.java
+++ b/user/test/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilderTest.java
@@ -38,6 +38,7 @@
 import com.google.gwt.dev.javac.TypeOracleTestingUtils;
 import com.google.gwt.dev.javac.impl.JavaResourceBase;
 import com.google.gwt.dev.javac.impl.SourceFileCompilationUnit;
+import com.google.gwt.dev.resource.Resource;
 import com.google.gwt.dev.util.log.PrintWriterTreeLogger;
 import com.google.gwt.user.rebind.rpc.testcases.client.AbstractSerializableTypes;
 import com.google.gwt.user.rebind.rpc.testcases.client.ClassWithTypeParameterThatErasesToObject;
@@ -132,10 +133,6 @@
         "com.google.gwt.user.client.rpc.IsSerializable", code));
   }
 
-  private static void addJavaIoSerializable(Set<CompilationUnit> units) {
-    units.add(new SourceFileCompilationUnit(JavaResourceBase.SERIALIZABLE));
-  }
-
   private static void addJavaLangException(Set<CompilationUnit> units) {
     StringBuffer code = new StringBuffer();
     code.append("package java.lang;\n");
@@ -145,14 +142,6 @@
     units.add(createMockCompilationUnit("java.lang.Exception", code));
   }
 
-  private static void addJavaLangObject(Set<CompilationUnit> units) {
-    units.add(new SourceFileCompilationUnit(JavaResourceBase.OBJECT));
-  }
-
-  private static void addJavaLangString(Set<CompilationUnit> units) {
-    units.add(new SourceFileCompilationUnit(JavaResourceBase.STRING));
-  }
-
   private static void addJavaLangThrowable(Set<CompilationUnit> units) {
     StringBuffer code = new StringBuffer();
     code.append("package java.lang;\n");
@@ -175,10 +164,10 @@
   }
 
   private static void addStandardClasses(Set<CompilationUnit> units) {
+    for (Resource resource : JavaResourceBase.getStandardResources()) {
+      units.add(new SourceFileCompilationUnit(resource));
+    }
     addGwtTransient(units);
-    addJavaIoSerializable(units);
-    addJavaLangObject(units);
-    addJavaLangString(units);
     addJavaUtilMap(units);
     addICRSE(units);
     addJavaLangException(units);