You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by nd...@apache.org on 2006/08/05 22:55:59 UTC
svn commit: r429046 -
/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/java/org/apache/harmony/luni/tests/java/lang/CharacterTest.java
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");
+ }
+ }
}