harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chunr...@apache.org
Subject svn commit: r696213 - in /harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang: ClassGenericsTest.java ClassGenericsTest4.java
Date Wed, 17 Sep 2008 09:25:32 GMT
Author: chunrong
Date: Wed Sep 17 02:25:31 2008
New Revision: 696213

URL: http://svn.apache.org/viewvc?rev=696213&view=rev
Log:
minor change for locale-aware ClassGenericsTest, only perform the locale-aware tested functions
in expected locales

Modified:
    harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassGenericsTest.java
    harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassGenericsTest4.java

Modified: harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassGenericsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassGenericsTest.java?rev=696213&r1=696212&r2=696213&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassGenericsTest.java (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassGenericsTest.java Wed Sep
17 02:25:31 2008
@@ -33,7 +33,7 @@
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
-
+import java.util.*;
 import junit.framework.TestCase;
 
 /*
@@ -96,6 +96,10 @@
     /**/@igt class MC011\u0576\u06C0\u06F10 extends Mc010\u0576\u06C0\u06F10 implements MI010\u0576\u06C0\u06F10
{};
     public void test_2() {
         //ClassGenericsTest<? super Class>.Mc002<ClassGenericsTest>.Mc004<ClassGenericsTest>
f1;
+        Locale locale = Locale.getDefault();
+        Locale locale2;
+        locale2 = new Locale("*.UTF8");
+        if(locale==locale2){
         Type ap[];
         TypeVariable tv;
         Type ab[];
@@ -255,7 +259,7 @@
         //////////////////////////////////////////////////////////////////////////////////////////////
 			if(!((Class)MC011\u0576\u06C0\u06F10.class.getGenericSuperclass()).getName().equals("java.lang.ClassGenericsTest$Mc010\u0576\u06C0\u06F10"))
fail("test_2, case 086 FAILED: "+((Class)Mc008\u0576\u06C0\u06F10.class.getGenericSuperclass()).getName());
 		//}
-
+        }
   }
 
     /**
@@ -417,6 +421,10 @@
 ///* + */    public void foo4For_5(ClassGenericsTest<? super Class>.Mc002<ClassGenericsTest>.Mc004<?>
a1, @igt(author="Czar") Mc003<Mc005> a2, @igt(author="President") Mc003<Mc005>
... a3) {}
 /* - */    public ClassGenericsTest<? super Class>.Mc002<ClassGenericsTest>.Mc004<ClassGenericsTest>
foo5For_5(X a1, Class<Type> a2,  ClassGenericsTest<? super Class>.Mc002<ClassGenericsTest>.Mc004<ClassGenericsTest>
a3) {return a3;}
     public void test_5() {
+        Locale locale = Locale.getDefault();
+        Locale locale2;
+        locale2 = new Locale("*.UTF8");
+        if(locale==locale2){
         Type rt;
         TypeVariable tv;
         ParameterizedType oc1;
@@ -773,6 +781,7 @@
         if (RuntimeAdditionalSupport1.openingFlag) {
 	        if(!m.toGenericString().equals("public transient java.lang.ClassGenericsTest<X>.Mc003<java.lang.ClassGenericsTest<X>.Mc005>
java.lang.ClassGenericsTest.foo4For_5(java.lang.ClassGenericsTest<? super java.lang.Class>.Mc002<java.lang.ClassGenericsTest>.Mc004<?>,java.lang.ClassGenericsTest<X>.Mc003<java.lang.ClassGenericsTest<X>.Mc005>,java.lang.ClassGenericsTest<X>.Mc003<java.lang.ClassGenericsTest<X>.Mc005>[])"))
fail("test_5, case 166 FAILED: |"+m.toGenericString()+"|");
 		}
+        }
   }
     
     /**
@@ -1153,4 +1162,4 @@
         if(!m.toGenericString().equals("public java.lang.ClassGenericsTest$MC014(java.lang.ClassGenericsTest,float)
throws java.io.IOException")) fail("test_6_5, case 008 FAILED: |"+m.toGenericString()+"|");
 
 	}    
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassGenericsTest4.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassGenericsTest4.java?rev=696213&r1=696212&r2=696213&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassGenericsTest4.java (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ClassGenericsTest4.java Wed Sep
17 02:25:31 2008
@@ -25,7 +25,7 @@
 import java.lang.reflect.*;
 import java.io.File;
 import java.io.FileOutputStream;
-
+import java.util.*;
 import org.apache.harmony.test.TestResources;
 
 import junit.framework.TestCase;
@@ -257,6 +257,10 @@
      * checks for cases when generalized classes have been loaded by another class loader
      */
     public void test_2 () throws Exception {
+        Locale locale = Locale.getDefault();
+        Locale locale2;
+        locale2 = new Locale("*.UTF8");
+        if(locale==locale2){
 		ClassLoader ld = TestResources.getLoader();
 		Class temp = ld.loadClass("org.apache.harmony.lang.generics.TemplateSet");
 		Class ac[] = temp.getDeclaredClasses();
@@ -441,8 +445,8 @@
 		if(!((Class)ai[0]).getName().equals("org.apache.harmony.lang.generics.TemplateSet$MI010\u0576\u06C0\u06F10"))
fail("test_2, case 085 FAILED: "+((Class)ai[0]).getName());
         //////////////////////////////////////////////////////////////////////////////////////////////
 		if(!((Class)MC011\u0576\u06C0\u06F10.getGenericSuperclass()).getName().equals("org.apache.harmony.lang.generics.TemplateSet$Mc010\u0576\u06C0\u06F10"))
fail("test_2, case 086 FAILED: "+((Class)Mc008\u0576\u06C0\u06F10.getGenericSuperclass()).getName());
-	}
-
+        }	
+}
     /**
      * spoiled signature
      */
@@ -800,4 +804,4 @@
 			}
         }	
 	}
-}
\ No newline at end of file
+}



Mime
View raw message