summaryrefslogtreecommitdiff
path: root/icu4j/main/tests
diff options
context:
space:
mode:
authorFredrik Roubert <roubert@google.com>2015-03-04 21:39:07 +0100
committerVictor Chang <vichang@google.com>2018-10-24 04:28:23 +0100
commita9d02afc25e2cc80248f74015eaa2ad1d730ad6e (patch)
treea075f852f23f282f8e40db186d4d47bf5be066be /icu4j/main/tests
parent58939380f52fd1ca6a6016d9d2c3303da16cb240 (diff)
downloadicu-a9d02afc25e2cc80248f74015eaa2ad1d730ad6e.tar.gz
Android patch: Skip charset tests that fail with customized data.
Suppression of ICU4C test failures was added by the ICU 51 upgrade: https://android.googlesource.com/platform/external/icu/+/8393335 Suppression of ICU4J test failures was added for ICU 55: https://android.googlesource.com/platform/external/icu/+/3db47ed It was then partially reverted for the O release: https://android.googlesource.com/platform/external/icu/+/b48a108 (cherry picked from commit 630aab079a3a1393e8535367ec7ec86822646437) Change-Id: Ifd6a0cb711496b840183a2fcde74a7679be1ed74
Diffstat (limited to 'icu4j/main/tests')
-rw-r--r--icu4j/main/tests/charset/src/com/ibm/icu/dev/test/charset/TestCharset.java16
-rw-r--r--icu4j/main/tests/charset/src/com/ibm/icu/dev/test/charset/TestConversion.java65
2 files changed, 76 insertions, 5 deletions
diff --git a/icu4j/main/tests/charset/src/com/ibm/icu/dev/test/charset/TestCharset.java b/icu4j/main/tests/charset/src/com/ibm/icu/dev/test/charset/TestCharset.java
index 5ffdd41a2..64cb4a256 100644
--- a/icu4j/main/tests/charset/src/com/ibm/icu/dev/test/charset/TestCharset.java
+++ b/icu4j/main/tests/charset/src/com/ibm/icu/dev/test/charset/TestCharset.java
@@ -645,7 +645,9 @@ public class TestCharset extends TestFmwk {
logln("finish: " + hex(finishArray));
}
} catch (CharacterCodingException ex) {
- errln(converter + " roundtrip test failed: " + ex.getMessage());
+ // Android patch: Skip tests that fail with customized data.
+ logln(converter + " roundtrip test failed: " + ex.getMessage());
+ // Android patch end.
ex.printStackTrace(System.err);
}
@@ -677,7 +679,9 @@ public class TestCharset extends TestFmwk {
}
} else {
if (result.isError()) {
- errln("Error should not have occurred while encoding HZ.(" + i + ")");
+ // Android patch: Skip tests that fail with customized data.
+ logln("Error should not have occurred while encoding HZ.(" + i + ")");
+ // Android patch end.
}
}
}
@@ -828,7 +832,9 @@ public class TestCharset extends TestFmwk {
return;
} catch (RuntimeException ex) {
if (!currentlybad) {currentlybad = true; badcount++; logln(""); }
- errln(converter + " " + ex.getClass().getName() + ": " + ex.getMessage());
+ // Android patch: Skip tests that fail with customized data.
+ logln(converter + " " + ex.getClass().getName() + ": " + ex.getMessage());
+ // Android patch end.
continue outer;
}
@@ -2377,8 +2383,10 @@ public class TestCharset extends TestFmwk {
if(!result.isError()){
byte[] expected = {(byte)0xA9, (byte)0xA5, (byte)0xAF, (byte)0xFE, (byte)0xA2, (byte)0xAE};
if(!equals(expected, out.array())){
- errln("Did not get the expected result for substitution bytes. Got: "+
+ // Android patch: Skip tests that fail with customized data.
+ logln("Did not get the expected result for substitution bytes. Got: "+
hex(out.array()));
+ // Android patch end.
}
logln("Output: "+ hex(out.array()));
}else{
diff --git a/icu4j/main/tests/charset/src/com/ibm/icu/dev/test/charset/TestConversion.java b/icu4j/main/tests/charset/src/com/ibm/icu/dev/test/charset/TestConversion.java
index 67c1cf641..8e6fd4bab 100644
--- a/icu4j/main/tests/charset/src/com/ibm/icu/dev/test/charset/TestConversion.java
+++ b/icu4j/main/tests/charset/src/com/ibm/icu/dev/test/charset/TestConversion.java
@@ -162,9 +162,35 @@ public class TestConversion extends TestFmwk {
* This feature is not in ICU4J.
* See #9601
*/
+ // Android patch: Skip tests that fail with customized data.
String [] testsToSkip = {
- "*test2"
+ "*test2",
+ "EUC-TW",
+ "gb18030",
+ "ibm-1386",
+ "ibm-1390",
+ "ibm-1390,swaplfnl",
+ "ibm-1399",
+ "ibm-16684",
+ "ibm-25546",
+ "ibm-930",
+ "ibm-943",
+ "ibm-970",
+ "ibm-971",
+ "IBM-eucJP",
+ "iso-2022-cn",
+ "iso-2022-jp",
+ "ISO-2022-JP-2",
+ "iso-2022-kr",
+ "ISO-2022-KR",
+ "JIS",
+ "JIS7",
+ "JIS8",
+ "lmbcs",
+ "windows-936",
+ "x11-compound-text",
};
+ // Android patch end.
for (int i = 0; i < testsToSkip.length; i++) {
if (cc.charset.equals(testsToSkip[i])) {
logln("");
@@ -465,6 +491,20 @@ public class TestConversion extends TestFmwk {
return;
}
+ // Android patch: Skip tests that fail with customized data.
+ String [] testsToSkip = {
+ "ibm-1390,swaplfnl",
+ };
+ for (int i = 0; i < testsToSkip.length; i++) {
+ if (cc.charset.equals(testsToSkip[i])) {
+ logln("");
+ logln("Skipping: " + cc.charset);
+ logln("...............................................");
+ return;
+ }
+ }
+ // Android patch end.
+
// ----for debugging only
logln("");
logln("TestToUnicode[" + caseNr + "] " + cc.charset + " ");
@@ -903,6 +943,29 @@ public class TestConversion extends TestFmwk {
cc.which = ((ICUResourceBundle) testcase.getObject("which")).getInt(); // only checking for ROUNDTRIP_SET
+ // Android patch: Skip tests that fail with customized data.
+ String [] testsToSkip = {
+ "HZ",
+ "ibm-1390",
+ "ibm-16684",
+ "ibm-25546",
+ "ibm-971",
+ "ISO-2022-CN",
+ "ISO-2022-JP",
+ "ISO-2022-JP-2",
+ "ISO-2022-KR",
+ "JIS7",
+ };
+ for (int i = 0; i < testsToSkip.length; i++) {
+ if (cc.charset.equals(testsToSkip[i])) {
+ logln("");
+ logln("Skipping: " + cc.charset);
+ logln("...............................................");
+ return;
+ }
+ }
+ // Android patch end.
+
// ----for debugging only
logln("");
logln("TestGetUnicodeSet[" + cc.charset + "] ");