ICU-2779 add Age=3.2 filter for ICU version 2.6 ONLY

X-SVN-Rev: 11708
This commit is contained in:
Alan Liu 2003-04-25 19:33:42 +00:00
parent da530c15c9
commit 2b2d152e74

View File

@ -5,8 +5,8 @@
******************************************************************************* *******************************************************************************
* *
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/translit/RoundTripTest.java,v $ * $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/translit/RoundTripTest.java,v $
* $Date: 2003/01/28 18:55:35 $ * $Date: 2003/04/25 19:33:42 $
* $Revision: 1.50 $ * $Revision: 1.51 $
* *
******************************************************************************* *******************************************************************************
*/ */
@ -15,6 +15,7 @@ package com.ibm.icu.dev.test.translit;
import com.ibm.icu.dev.test.*; import com.ibm.icu.dev.test.*;
import com.ibm.icu.lang.*; import com.ibm.icu.lang.*;
import com.ibm.icu.text.*; import com.ibm.icu.text.*;
import com.ibm.icu.util.VersionInfo;
import com.ibm.icu.impl.Utility; import com.ibm.icu.impl.Utility;
import java.io.*; import java.io.*;
import java.text.ParseException; import java.text.ParseException;
@ -26,6 +27,13 @@ import java.util.Locale;
*/ */
public class RoundTripTest extends TestFmwk { public class RoundTripTest extends TestFmwk {
// Time bomb code to temporarily modify the behavior of this test
// to account for changes in the Unicode properties for ICU 2.6.
static VersionInfo ICU26 = VersionInfo.getInstance(2,6,0,0);
static boolean isICU26() {
return ICU26.compareTo(VersionInfo.ICU_VERSION) == 0;
}
static final boolean EXTRA_TESTS = true; static final boolean EXTRA_TESTS = true;
static final boolean PRINT_RULES = true; static final boolean PRINT_RULES = true;
@ -156,10 +164,17 @@ public class RoundTripTest extends TestFmwk {
t.transliterate("\u0061\u0101\u0069"); t.transliterate("\u0061\u0101\u0069");
} }
String getGreekSet() {
// Time bomb
return isICU26() ?
"[[\u003B\u00B7[:Greek:]-[\u03D7-\u03EF]]&[:Age=3.2:]]" :
"[\u003B\u00B7[:Greek:]-[\u03D7-\u03EF]]";
}
public void TestGreek() throws IOException, ParseException { public void TestGreek() throws IOException, ParseException {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
new Test("Latin-Greek", 50) new Test("Latin-Greek", 50)
.test("[a-zA-Z]", "[\u003B\u00B7[:Greek:]-[\u03D7-\u03EF]]", .test("[a-zA-Z]", getGreekSet(),
"[\u00B5\u037A\u03D0-\u03F5]", /* roundtrip exclusions */ "[\u00B5\u037A\u03D0-\u03F5]", /* roundtrip exclusions */
this, new LegalGreek(true)); this, new LegalGreek(true));
showElapsed(start, "TestGreek"); showElapsed(start, "TestGreek");
@ -168,7 +183,7 @@ public class RoundTripTest extends TestFmwk {
public void TestGreekUNGEGN() throws IOException, ParseException { public void TestGreekUNGEGN() throws IOException, ParseException {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
new Test("Latin-Greek/UNGEGN") new Test("Latin-Greek/UNGEGN")
.test("[a-zA-Z]", "[\u003B\u00B7[:Greek:]-[\u03D7-\u03EF]]", .test("[a-zA-Z]", getGreekSet(),
"[\u00B5\u037A\u03D0-\uFFFF{\u039C\u03C0}]", /* roundtrip exclusions */ "[\u00B5\u037A\u03D0-\uFFFF{\u039C\u03C0}]", /* roundtrip exclusions */
this, new LegalGreek(false)); this, new LegalGreek(false));
showElapsed(start, "TestGreekUNGEGN"); showElapsed(start, "TestGreekUNGEGN");
@ -177,7 +192,7 @@ public class RoundTripTest extends TestFmwk {
public void Testel() throws IOException, ParseException { public void Testel() throws IOException, ParseException {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
new Test("Latin-el") new Test("Latin-el")
.test("[a-zA-Z]", "[\u003B\u00B7[:Greek:]-[\u03D7-\u03EF]]", .test("[a-zA-Z]", getGreekSet(),
"[\u00B5\u037A\u03D0-\uFFFF{\u039C\u03C0}]", /* roundtrip exclusions */ "[\u00B5\u037A\u03D0-\uFFFF{\u039C\u03C0}]", /* roundtrip exclusions */
this, new LegalGreek(false)); this, new LegalGreek(false));
showElapsed(start, "Testel"); showElapsed(start, "Testel");