Update tests

This commit is contained in:
Liam Miller-Cushon 2026-01-15 15:35:50 +01:00
parent cf4e59f3f6
commit f9139b2493
2 changed files with 10 additions and 0 deletions

View File

@ -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");

View File

@ -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)