* tests/regression/base/All.java,
[cacao.git] / tests / regression / bugzilla / PR80.java
index 5e6e401cbdaf0dd80b12134615121cc575e2bfa1..85f23d8209aa1523613fa2fb637de4dd2ba3b30a 100644 (file)
 */
 
 
-import junit.framework.*;
-import junit.textui.*;
-
-public class PR80 extends TestCase {
-    public static void main(String[] args) {
-        TestRunner.run(suite());
-    }
-
-    public static Test suite() {
-        return new TestSuite(PR80.class);
-    }
-
-    public void test() {
-        try {
-            // Taken from Mauve gnu.testlet.java.lang.System.arraycopy
-            int[] a = new int[5];
-            int[] b = new int[5];
-            System.arraycopy(a, 4, b, 4, Integer.MAX_VALUE);
-            fail("Should throw ArrayIndexOutOfBoundsException");
-        } catch (ArrayIndexOutOfBoundsException success) {
-        }
+import org.junit.Test;
+
+public class PR80 {
+    @Test ( expected = ArrayIndexOutOfBoundsException.class )
+    public void test() throws ArrayIndexOutOfBoundsException {
+        // Taken from Mauve gnu.testlet.java.lang.System.arraycopy
+        int[] a = new int[5];
+        int[] b = new int[5];
+        System.arraycopy(a, 4, b, 4, Integer.MAX_VALUE);
     }
 }