harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r526727 - in /harmony/enhanced/drlvm/trunk/src/test/regression/H3175: ./ Test.java run.test.xml
Date Mon, 09 Apr 2007 12:23:22 GMT
Author: varlax
Date: Mon Apr  9 05:23:21 2007
New Revision: 526727

URL: http://svn.apache.org/viewvc?view=rev&rev=526727
Log:
regression test for HARMONY-3175

Added:
    harmony/enhanced/drlvm/trunk/src/test/regression/H3175/
    harmony/enhanced/drlvm/trunk/src/test/regression/H3175/Test.java
    harmony/enhanced/drlvm/trunk/src/test/regression/H3175/run.test.xml

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H3175/Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H3175/Test.java?view=auto&rev=526727
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H3175/Test.java (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H3175/Test.java Mon Apr  9 05:23:21 2007
@@ -0,0 +1,61 @@
+package org.apache.harmony.drlvm.tests.regression.h3175;
+
+import junit.framework.TestCase;
+
+public class Test extends TestCase {
+
+    static int i1,i2;
+    static byte[] b1, b2;
+
+
+    public void testSwitch1() throws Exception {
+        blit();
+    }
+    static void blit() {
+        int dp=0;
+        switch (i1) {
+            case 1: dp=0; break;
+            case 7: break;
+            case 6: break;
+            case 2: break;
+        }              
+    }
+
+
+
+
+
+
+    public void testSwitch2() throws Exception {
+        blit2();
+    }
+
+     static void blit2() {
+        byte[] destData=b2;
+        byte[] alphaData=b1;
+        int dtype=i1;
+        int destAlphaShift = i2;
+        int alpha = 0;
+        int dy = 0;
+        for (; dy > 0; --dy){
+            switch (dy) {
+                case 3: dy = destData[0]; break;
+                case 8: dy = 0; break;
+                case 2: dy = 0; break;
+                case 5:
+                    int i = 0;
+                    while (i < alpha) {
+                        if ((i == alphaData[0]) && (i == alphaData[2])) {}
+                    }
+                    break;
+            }
+            final int data = 0  << destAlphaShift;
+            switch (dtype) {
+                case 1: alpha = data;  break;
+                case 4: destData[0] = 0; 
+                case 5: destData[1] = (byte)data; break;
+            }
+        }
+    }
+}
+

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H3175/run.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H3175/run.test.xml?view=auto&rev=526727
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H3175/run.test.xml (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H3175/run.test.xml Mon Apr  9 05:23:21
2007
@@ -0,0 +1,10 @@
+<project name="RUN HARMONY-3175 Regression Test">
+    <target name="run-test">
+        <echo message="Running on OPT"/>
+        <run-junit-test 
+             test="org.apache.harmony.drlvm.tests.regression.h3175.Test"
+             vmarg="-Xem:opt">
+        </run-junit-test>
+    </target>
+</project>
+



Mime
View raw message