//Test toUnicode
//doTestToUnicode(testCase.input,testCase.output,IDNA.DEFAULT,testCase.expected);
}
}
public void TestNamePrepConformance() throws Exception{
StringPrep namePrep = StringPrep.getInstance(StringPrep.RFC3491_NAMEPREP);
for(int i=0; i<TestData.conformanceTestCases.length;i++){
TestData.ConformanceTestCase testCase = TestData.conformanceTestCases[i];
UCharacterIterator iter = UCharacterIterator.getInstance(testCase.input);
try{
StringBuffer output = namePrep.prepare(iter,StringPrep.DEFAULT);
if(testCase.output !=null && output!=null && !testCase.output.equals(output.toString())){
errln("Did not get the expected output. Expected: " + prettify(testCase.output)+
" Got: "+ prettify(output) );
}
if(testCase.expected!=null && !unassignedException.equals(testCase.expected)){
errln("Did not get the expected exception. The operation succeeded!");
}
}catch(StringPrepParseException ex){
if(testCase.expected == null || !ex.equals(testCase.expected)){
errln("Did not get the expected exception for source: " +testCase.input +" Got: "+ ex.toString());
}
}
try{
iter.setToStart();
StringBuffer output = namePrep.prepare(iter,StringPrep.ALLOW_UNASSIGNED);
if(testCase.output !=null && output!=null && !testCase.output.equals(output.toString())){
errln("Did not get the expected output. Expected: " + prettify(testCase.output)+
" Got: "+ prettify(output) );
}
if(testCase.expected!=null && !unassignedException.equals(testCase.expected)){