diff options
author | Jorg Pleumann <> | 2009-03-31 10:34:33 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-31 10:34:33 -0700 |
commit | 5cb722f6c2b665846e600b90d4038026fa634a19 (patch) | |
tree | bff1bd0adb055133a6fd31861a751e7745a5d072 /nio_char | |
parent | 508605c26ff25cbddbf5311da44be23640c6df53 (diff) | |
download | libcore-5cb722f6c2b665846e600b90d4038026fa634a19.zip libcore-5cb722f6c2b665846e600b90d4038026fa634a19.tar.gz libcore-5cb722f6c2b665846e600b90d4038026fa634a19.tar.bz2 |
AI 143637: am: CL 143457 Bringing the nio_char tests down to zero failures.
Original author: jorgp
Merged from: //branches/cupcake/...
Automated import of CL 143637
Diffstat (limited to 'nio_char')
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; } } |