harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r766525 - in /harmony/enhanced/drlvm/trunk/src/test/regression: H2141/ H2141/AbcdTest.java H2141/run.test.xml H2144/ H2144/Abcd2Test.java H2144/run.test.xml H2147/ H2147/Abcd1Test.java H2147/LowBoundCheckTest.java H2147/run.test.xml README.txt
Date Sun, 19 Apr 2009 21:52:14 GMT
Author: egor
Date: Sun Apr 19 21:52:13 2009
New Revision: 766525

URL: http://svn.apache.org/viewvc?rev=766525&view=rev
Log:
Added reg tests from HARMONY-2141, HARMONY-2144, HARMONY-2147

updated README for regression tests

Added:
    harmony/enhanced/drlvm/trunk/src/test/regression/H2141/
    harmony/enhanced/drlvm/trunk/src/test/regression/H2141/AbcdTest.java   (with props)
    harmony/enhanced/drlvm/trunk/src/test/regression/H2141/run.test.xml   (with props)
    harmony/enhanced/drlvm/trunk/src/test/regression/H2144/
    harmony/enhanced/drlvm/trunk/src/test/regression/H2144/Abcd2Test.java   (with props)
    harmony/enhanced/drlvm/trunk/src/test/regression/H2144/run.test.xml   (with props)
    harmony/enhanced/drlvm/trunk/src/test/regression/H2147/
    harmony/enhanced/drlvm/trunk/src/test/regression/H2147/Abcd1Test.java   (with props)
    harmony/enhanced/drlvm/trunk/src/test/regression/H2147/LowBoundCheckTest.java   (with
props)
    harmony/enhanced/drlvm/trunk/src/test/regression/H2147/run.test.xml   (with props)
Modified:
    harmony/enhanced/drlvm/trunk/src/test/regression/README.txt

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H2141/AbcdTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H2141/AbcdTest.java?rev=766525&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H2141/AbcdTest.java (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H2141/AbcdTest.java Sun Apr 19 21:52:13
2009
@@ -0,0 +1,52 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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 org.apache.harmony.drlvm.tests.regression.h2141;
+
+import junit.framework.TestCase;
+
+public class AbcdTest extends TestCase {
+
+    public void test() {
+        int i = 0;
+        int arr[] = new int[300000];
+        try {
+            for(i=0; i<100000; i++) {
+                while(i<3) {
+                    arr[i-1] = 1;
+                    i++;
+                }
+            }
+            fail("ArrayIndexOutOfBoundsException wasn't thrown");
+        } catch (ArrayIndexOutOfBoundsException e) {
+            System.out.println("TEST 1 PASSED");
+        }
+
+        i = 0;
+        try {
+            for(i=0; i<100000; i++) {
+                if (i>5) {
+                    arr[i-100] = 1;
+                    i++;
+                }
+            }
+            fail("ArrayIndexOutOfBoundsException wasn't thrown");
+        } catch (ArrayIndexOutOfBoundsException e) {
+            System.out.println("TEST 2 PASSED");
+        }
+    }
+}

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H2141/AbcdTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H2141/run.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H2141/run.test.xml?rev=766525&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H2141/run.test.xml (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H2141/run.test.xml Sun Apr 19 21:52:13
2009
@@ -0,0 +1,25 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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. -->
+
+<project name="RUN HARMONY-2141 Regression Test">
+    <target name="run-test">
+        <run-junit-test
+             test="org.apache.harmony.drlvm.tests.regression.h2141.AbcdTest"
+             vmarg="-Xem:server_static">
+        </run-junit-test>
+    </target>
+</project>
+

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H2141/run.test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H2144/Abcd2Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H2144/Abcd2Test.java?rev=766525&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H2144/Abcd2Test.java (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H2144/Abcd2Test.java Sun Apr 19 21:52:13
2009
@@ -0,0 +1,45 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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 org.apache.harmony.drlvm.tests.regression.h2144;
+
+import junit.framework.TestCase;
+
+public class Abcd2Test extends TestCase {
+
+    private final int limit = 10000;
+
+    public void test() {
+        int arr[] = new int[limit];
+        int j=1;
+        try {
+            for(int k=2; k<limit; k=1+k+k*j) {
+                if (k<0) System.out.println("---Overflow---");
+                System.out.println("k=" + k + ": arr[" + (k-2) + "] will be called");
+                arr[k] = arr[k-2];
+                j = k*k;
+            }
+        } catch (ArrayIndexOutOfBoundsException e) {
+            System.out.println("TEST PASSED ArrayIndexOutOfBoundsException was thrown");
+            return;
+        } catch (Exception e) {
+            e.printStackTrace();
+            fail("TEST FAILED: unexpected exception was thrown");
+        }
+        fail("TEST FAILED: ArrayIndexOutOfBoundsException wasn't thrown");
+    }
+}

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H2144/Abcd2Test.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H2144/run.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H2144/run.test.xml?rev=766525&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H2144/run.test.xml (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H2144/run.test.xml Sun Apr 19 21:52:13
2009
@@ -0,0 +1,25 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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. -->
+
+<project name="RUN HARMONY-2144 Regression Test">
+    <target name="run-test">
+        <run-junit-test
+             test="org.apache.harmony.drlvm.tests.regression.h2144.Abcd2Test"
+             vmarg="-Xem:server_static">
+        </run-junit-test>
+    </target>
+</project>
+

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H2144/run.test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H2147/Abcd1Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H2147/Abcd1Test.java?rev=766525&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H2147/Abcd1Test.java (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H2147/Abcd1Test.java Sun Apr 19 21:52:13
2009
@@ -0,0 +1,39 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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 org.apache.harmony.drlvm.tests.regression.h2147;
+
+import junit.framework.TestCase;
+
+public class Abcd1Test extends TestCase {
+
+    private final int limit = 1000;
+
+    public void test() {
+        int arr[] = new int[limit];
+        try {
+            for(int k=1; k<limit; ) {
+                System.out.println("k=" + k + ": arr[" + (k-1) + "] will be called");
+                k=arr[k-1];
+            }
+        } catch (ArrayIndexOutOfBoundsException e) {
+            System.out.println("TEST PASSED: ArrayIndexOutOfBoundsException was thrown");
+            return;
+        }
+        fail("TEST FAILED: ArrayIndexOutOfBoundsException wasn't thrown");
+    }
+}

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H2147/Abcd1Test.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H2147/LowBoundCheckTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H2147/LowBoundCheckTest.java?rev=766525&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H2147/LowBoundCheckTest.java (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H2147/LowBoundCheckTest.java Sun Apr
19 21:52:13 2009
@@ -0,0 +1,39 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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 org.apache.harmony.drlvm.tests.regression.h2147;
+
+import junit.framework.TestCase;
+
+public class LowBoundCheckTest extends TestCase {
+
+    static int num = 0;
+
+    public void test() {
+        try {
+            int[] arr = new int[5];
+            int limit = arr.length-1;
+            for (int j=limit; j > 0; j--) {
+                System.out.println("Call arr[" + (j-3) + "]");
+                num = arr[j-3];
+            }
+            fail("TEST FAILED: ArrayIndexOutOfBoundsException wasn't thrown");
+        } catch (ArrayIndexOutOfBoundsException ae) {
+            System.out.println("TEST PASSED");
+        }
+    }
+}

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H2147/LowBoundCheckTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H2147/run.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H2147/run.test.xml?rev=766525&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H2147/run.test.xml (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H2147/run.test.xml Sun Apr 19 21:52:13
2009
@@ -0,0 +1,29 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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. -->
+
+<project name="RUN HARMONY-2147 Regression Test">
+    <target name="run-test">
+        <run-junit-test
+             test="org.apache.harmony.drlvm.tests.regression.h2147.Abcd1Test"
+             vmarg="-Xem:server_static">
+        </run-junit-test>
+        <run-junit-test
+             test="org.apache.harmony.drlvm.tests.regression.h2147.LowBoundCheckTest"
+             vmarg="-Xem:server_static">
+        </run-junit-test>
+    </target>
+</project>
+

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H2147/run.test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/enhanced/drlvm/trunk/src/test/regression/README.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/README.txt?rev=766525&r1=766524&r2=766525&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/README.txt (original)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/README.txt Sun Apr 19 21:52:13 2009
@@ -108,9 +108,9 @@
 --------------
 To execute the Regression Test Suite type
 
-    > build reg.test
+    > ant reg.test
 
-in build directory of DRLVM workspace. This will execute all non-excluded
+in top level directory of DRLVM workspace. This will execute all non-excluded
 regression tests for your platform configuration.
 
 Also by providing the value for 'test.case' property you can choose 
@@ -118,12 +118,12 @@
 For example, to run only H1234 regression test type the following 
 on your command line:
 
-    > build -Dtest.case=H1234 reg.test
+    > ant -Dtest.case=H1234 reg.test
 
 To check for several regressions use coma or space separated list as a value for
 the property. So the following command:
 
-    > build -Dtest.case="H1234,H4321" reg.test
+    > ant -Dtest.case="H1234,H4321" reg.test
 
 will execute two regression tests - H1234 and H4321.
  



Mime
View raw message