mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
Update tests
This commit is contained in:
parent
cf4e59f3f6
commit
f9139b2493
@ -106,6 +106,7 @@ public class Encodings {
|
||||
if (!equals(bs, bytes))
|
||||
throw new Exception(charset + ": String.getBytes failed");
|
||||
|
||||
/* String.getBytesLength(Charset charset) */
|
||||
if (bs.length != str.getBytesLength(charset))
|
||||
throw new Exception(charset + ": String.getBytesLength failed");
|
||||
|
||||
|
||||
@ -397,6 +397,14 @@ public class Exceptions {
|
||||
}});
|
||||
}
|
||||
|
||||
private static void getBytesLength() {
|
||||
System.out.println("getBytesLength(Charset charset)");
|
||||
tryCatch(" null", NullPointerException.class, new Runnable() {
|
||||
public void run() {
|
||||
"foo".getBytesLength((Charset)null);
|
||||
}});
|
||||
}
|
||||
|
||||
private static void contentEquals() {
|
||||
System.out.println("contentEquals(StringBuffer sb)");
|
||||
tryCatch(" null", NullPointerException.class, new Runnable() {
|
||||
@ -640,6 +648,7 @@ public class Exceptions {
|
||||
// getBytes(Locale)
|
||||
// getBytes(String)
|
||||
// getBytes(Charset)
|
||||
getBytesLength(); // getBytesLength(Charset)
|
||||
contentEquals(); // contentEquals(StringBuffer)
|
||||
compareTo(); // compareTo(String), compareTo(Object)
|
||||
compareToIgnoreCase();// compareToIgnoreCase(String)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user