summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nio_char/src/test/java/tests/api/java/nio/charset/Charset_AbstractTest.java15
-rw-r--r--nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_x_windows_950.java1
-rw-r--r--nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByteAbstractTest.java18
3 files changed, 18 insertions, 16 deletions
diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_AbstractTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_AbstractTest.java
index 10d6caf..9850959 100644
--- a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_AbstractTest.java
+++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_AbstractTest.java
@@ -262,10 +262,11 @@ public class Charset_AbstractTest extends TestCase {
expected = expectedCB.get();
actual = actualCB.get();
if (actual != expected) {
- System.out.format("Mismatch at index %d: %d instead of expected %d.\n",
+ String detail = String.format(
+ "Mismatch at index %d: %d instead of expected %d.\n",
i, (int) actual, (int) expected);
match = false;
- fail(msg);
+ fail(msg + ": " + detail);
}
// else {
// System.out.format("Match index %d: %d = %d\n",
@@ -289,10 +290,11 @@ public class Charset_AbstractTest extends TestCase {
for (int i = 0; i < len; i++) {
actual = actualCB.get();
if (actual != expected[i]) {
- System.out.format("Mismatch at index %d: %d instead of expected %d.\n",
+ String detail = String.format(
+ "Mismatch at index %d: %d instead of expected %d.\n",
i, (int) actual, (int) expected[i]);
match = false;
- fail(msg);
+ fail(msg + ": " + detail);
}
// else {
// System.out.format("Match index %d: %d = %d\n",
@@ -316,10 +318,11 @@ public class Charset_AbstractTest extends TestCase {
for (int i = 0; i < len; i++) {
actual = actualBB.get();
if (actual != expected[i]) {
- System.out.format("Mismatch at index %d: %d instead of expected %d.\n",
+ String detail = String.format(
+ "Mismatch at index %d: %d instead of expected %d.\n",
i, actual & 0xff, expected[i] & 0xff);
match = false;
- fail(msg);
+ fail(msg + ": " + detail);
}
}
assertTrue(msg, match);
diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_x_windows_950.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_x_windows_950.java
index 5a1faa2..61685f1 100644
--- a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_x_windows_950.java
+++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_MultiByte_x_windows_950.java
@@ -241,7 +241,6 @@ public class Charset_MultiByte_x_windows_950 extends Charset_AbstractTest {
method = "functionalCoDec_REPR",
args = {}
)
- @KnownFailure("This Characterset is not properly supported in Android!")
@Override
public void test_Decode() throws CharacterCodingException {
super.test_Decode();
diff --git a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByteAbstractTest.java b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByteAbstractTest.java
index c9d00bc..38e4256 100644
--- a/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByteAbstractTest.java
+++ b/nio_char/src/test/java/tests/api/java/nio/charset/Charset_SingleByteAbstractTest.java
@@ -155,16 +155,16 @@ public class Charset_SingleByteAbstractTest extends Charset_AbstractTest {
else {
if (expected[i] == 65533) {
if (actual[i] == (bytes[i] & 0xff)) {
- System.out.format("REPLACE mismatch at index %d (byte %d): %d instead of expected %d.\n",
- i, bytes[i] & 0xff, (int) actual[i], (int) expected[i]);
+// System.out.format("REPLACE mismatch at index %d (byte %d): %d instead of expected %d.\n",
+// i, bytes[i] & 0xff, (int) actual[i], (int) expected[i]);
} else {
- System.out.format("REPLACE mismatch at index %d (byte %d): %d instead of expected %d.\n",
- i, bytes[i] & 0xff, (int) actual[i], (int) expected[i]);
+// System.out.format("REPLACE mismatch at index %d (byte %d): %d instead of expected %d.\n",
+// i, bytes[i] & 0xff, (int) actual[i], (int) expected[i]);
}
replaceMatch = false;
} else {
- System.out.format("MISMATCH at index %d (byte %d): %d instead of expected %d.\n",
- i, bytes[i] & 0xff, (int) actual[i], (int) expected[i]);
+// System.out.format("MISMATCH at index %d (byte %d): %d instead of expected %d.\n",
+// i, bytes[i] & 0xff, (int) actual[i], (int) expected[i]);
match = false;
}
}
@@ -176,7 +176,7 @@ public class Charset_SingleByteAbstractTest extends Charset_AbstractTest {
}
assertTrue(msg, match);
if (!replaceMatch) {
- System.out.println("for charset " + charsetName);
+// System.out.println("for charset " + charsetName);
}
}
@@ -199,8 +199,8 @@ public class Charset_SingleByteAbstractTest extends Charset_AbstractTest {
for (int i = 0; i < len; i++) {
if ((actual[i] != expected[i]) &&
!((chars[i] == 65533)) && (actual[i] == 63)) {
- System.out.format("MISMATCH at index %d: %d instead of expected %d.\n",
- i, actual[i], expected[i]);
+// System.out.format("MISMATCH at index %d: %d instead of expected %d.\n",
+// i, actual[i], expected[i]);
match = false;
}
}