harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r429046 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/java/org/apache/harmony/luni/tests/java/lang/CharacterTest.java
Date Sat, 05 Aug 2006 20:55:59 GMT
Author: ndbeyer
Date: Sat Aug  5 13:55:59 2006
New Revision: 429046

URL: http://svn.apache.org/viewvc?rev=429046&view=rev
Log:
(Missed the test case in previous commit.) Apply patch for HARMONY-1033: [classlib][lang]compatibility:
expected IndexOutOfBoundsException for Character.codePointAt

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/java/org/apache/harmony/luni/tests/java/lang/CharacterTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/java/org/apache/harmony/luni/tests/java/lang/CharacterTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/java/org/apache/harmony/luni/tests/java/lang/CharacterTest.java?rev=429046&r1=429045&r2=429046&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/java/org/apache/harmony/luni/tests/java/lang/CharacterTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/java/org/apache/harmony/luni/tests/java/lang/CharacterTest.java
Sat Aug  5 13:55:59 2006
@@ -598,4 +598,34 @@
         } catch (NullPointerException e) {
         }
     }
+    
+    public void test_codePointAt_Invalid() {
+
+        try {           
+            Character.codePointAt(null, 6, 4);
+            fail("Expected IndexOutOfBoundsException");
+        } catch (IndexOutOfBoundsException e) {
+            // expected
+        } catch (Exception e) {
+            fail("Expected IndexOutOfBoundsException");
+        }
+
+        try {           
+            Character.codePointAt(null, 4, 6);
+            fail("Expected NullPointerException");
+        } catch (NullPointerException e) {
+            // expected
+        } catch (Exception e) {
+            fail("Expected NullPointerException");
+        }
+
+        try {           
+            Character.codePointAt(null, 0, 0);
+            fail("Expected IndexOutOfBoundsException");
+        } catch (IndexOutOfBoundsException e) {
+            // expected
+        } catch (Exception e) {
+            fail("Expected IndexOutOfBoundsException");
+        }
+    }
 }



Mime
View raw message