ICU-1982 Test data for alias mechanism and new types
X-SVN-Rev: 9120
This commit is contained in:
parent
9aec93818e
commit
957bb01b53
@ -0,0 +1,59 @@
|
||||
package com.ibm.icu.dev.data;
|
||||
|
||||
import java.util.ListResourceBundle;
|
||||
import com.ibm.icu.impl.ICUListResourceBundle;
|
||||
|
||||
public class TestDataElements_testaliases extends ICUListResourceBundle {
|
||||
|
||||
public TestDataElements_testaliases () {
|
||||
super.contents = data;
|
||||
}
|
||||
private static Object[][] data = new Object[][] {
|
||||
{
|
||||
"CollationElements",
|
||||
new ICUListResourceBundle.Alias("/ICUDATA/uk"),
|
||||
},
|
||||
|
||||
{
|
||||
"anotheralias",
|
||||
new ICUListResourceBundle.Alias("/ICUDATA/uk/CollationElements"),
|
||||
},
|
||||
{
|
||||
"nonexisting",
|
||||
new ICUListResourceBundle.Alias("/ICUDATA/uk"),
|
||||
},
|
||||
{
|
||||
"referencingalias",
|
||||
new ICUListResourceBundle.Alias("testaliases/anotheralias/Sequence"),
|
||||
},
|
||||
{
|
||||
"simplealias",
|
||||
new ICUListResourceBundle.Alias("testtypes/menu/file/open"),
|
||||
},
|
||||
{
|
||||
"zoneStrings",
|
||||
new Object[]{
|
||||
new ICUListResourceBundle.Alias("/ICUDATA/en"),
|
||||
new ICUListResourceBundle.Alias("/ICUDATA/en"),
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
"zoneTests",
|
||||
new Object[][]{
|
||||
{
|
||||
"zoneAlias",
|
||||
new ICUListResourceBundle.Alias("/ICUDATA/en/zoneStrings"),
|
||||
},
|
||||
{
|
||||
"zoneAlias1",
|
||||
new ICUListResourceBundle.Alias("/ICUDATA/en/zoneStrings/3"),
|
||||
},
|
||||
{
|
||||
"zoneAlias2",
|
||||
new ICUListResourceBundle.Alias("/ICUDATA/en/zoneStrings/3/0"),
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.ibm.icu.dev.data;
|
||||
|
||||
import java.util.ListResourceBundle;
|
||||
import com.ibm.icu.impl.ICUListResourceBundle;
|
||||
/**
|
||||
* @author Ram
|
||||
*
|
||||
* To change this generated comment edit the template variable "typecomment":
|
||||
* Window>Preferences>Java>Templates.
|
||||
* To enable and disable the creation of type comments go to
|
||||
* Window>Preferences>Java>Code Generation.
|
||||
*/
|
||||
public class TestDataElements_testcircularalias extends ICUListResourceBundle {
|
||||
public TestDataElements_testcircularalias() {
|
||||
super.contents = data;
|
||||
}
|
||||
private static Object[][] data = new Object[][] {
|
||||
{
|
||||
"aaa",
|
||||
new ICUListResourceBundle.Alias("testcircularalias/aab"),
|
||||
},
|
||||
{
|
||||
"aab",
|
||||
new ICUListResourceBundle.Alias("testcircularalias/aac"),
|
||||
},
|
||||
{
|
||||
"aac",
|
||||
new ICUListResourceBundle.Alias("testcircularalias/aaa"),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
133
icu4j/src/com/ibm/icu/dev/data/TestDataElements_testtypes.java
Normal file
133
icu4j/src/com/ibm/icu/dev/data/TestDataElements_testtypes.java
Normal file
@ -0,0 +1,133 @@
|
||||
package com.ibm.icu.dev.data;
|
||||
|
||||
import java.util.ListResourceBundle;
|
||||
import com.ibm.icu.impl.ICUListResourceBundle;
|
||||
|
||||
public class TestDataElements_testtypes extends ICUListResourceBundle {
|
||||
|
||||
public TestDataElements_testtypes () {
|
||||
super.contents = data;
|
||||
}
|
||||
private static Object[][] data = new Object[][] {
|
||||
{
|
||||
"binarytest",
|
||||
new ICUListResourceBundle.CompressedBinary(
|
||||
"\u0000\u000F\u0001\u0203\u0405\u0607\u0809\u0A0B" +
|
||||
"\u0C0D\u0E00"),
|
||||
},
|
||||
{
|
||||
"emptyarray",
|
||||
new String[] {
|
||||
},
|
||||
},
|
||||
{
|
||||
"emptybin",
|
||||
new ICUListResourceBundle.CompressedBinary(null),
|
||||
},
|
||||
{
|
||||
"emptyexplicitstring",
|
||||
"",
|
||||
},
|
||||
{
|
||||
"emptyint",
|
||||
new Integer(0),
|
||||
},
|
||||
{
|
||||
"emptyintv",
|
||||
new Integer[] {
|
||||
},
|
||||
},
|
||||
{
|
||||
"emptystring",
|
||||
"",
|
||||
},
|
||||
{
|
||||
"emptytable",
|
||||
new Object[][]{
|
||||
},
|
||||
},
|
||||
{
|
||||
"importtest",
|
||||
new ICUListResourceBundle.CompressedBinary(
|
||||
"\u0000\u000F\u0001\u0203\u0405\u0607\u0809\u0A0B" +
|
||||
"\u0C0D\u0E00"),
|
||||
},
|
||||
{
|
||||
"integerarray",
|
||||
new Integer[] {
|
||||
new Integer(1),
|
||||
new Integer(2),
|
||||
new Integer(3),
|
||||
new Integer(-3),
|
||||
new Integer(4),
|
||||
new Integer(5),
|
||||
new Integer(6),
|
||||
new Integer(7),
|
||||
},
|
||||
},
|
||||
{
|
||||
"menu",
|
||||
new Object[][]{
|
||||
{
|
||||
"file",
|
||||
new Object[][]{
|
||||
{
|
||||
"exit",
|
||||
"Exit",
|
||||
},
|
||||
{
|
||||
"open",
|
||||
"Open",
|
||||
},
|
||||
{
|
||||
"save",
|
||||
"Save",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"minusone",
|
||||
new Integer(-1),
|
||||
},
|
||||
{
|
||||
"one",
|
||||
new Integer(1),
|
||||
},
|
||||
{
|
||||
"onehundredtwentythree",
|
||||
new Integer(123),
|
||||
},
|
||||
{
|
||||
"plusone",
|
||||
new Integer(1),
|
||||
},
|
||||
{
|
||||
"string",
|
||||
new String[] {
|
||||
},
|
||||
},
|
||||
{
|
||||
"stringTable",
|
||||
new Object[]{
|
||||
new String[] {
|
||||
},
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
"test_underscores",
|
||||
"test message ....",
|
||||
},
|
||||
{
|
||||
"testescape",
|
||||
"tab:\u0009 cr:\f ff:\u000C newline:\n backslash:\\" +
|
||||
" quote=\\\' doubleQuote=\\\" singlequoutes=''",
|
||||
},
|
||||
{
|
||||
"zerotest",
|
||||
"abc\u0000def",
|
||||
},
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user