ICU-990 improve error reporting

X-SVN-Rev: 4972
This commit is contained in:
Alan Liu 2001-06-12 18:08:22 +00:00
parent 01902b9744
commit d29ea969e6

View File

@ -617,14 +617,14 @@ UnicodeSetTest::expectPattern(UnicodeSet& set,
set.toPattern(temppattern);
UnicodeSet *tempset=new UnicodeSet(temppattern, status);
if (U_FAILURE(status)) {
errln(UnicodeString("FAIL: Construction with the pattern derived from toPattern() failed"));
errln(UnicodeString("FAIL: applyPattern(\""+ pattern + "\").toPattern() => " + temppattern + " => invalid pattern"));
return;
}
if(*tempset != set || getPairs(*tempset) != getPairs(set)){
errln(UnicodeString("FAIL: "+ pattern + "!=>" + temppattern + ". Pairs \""+ escape(getPairs(*tempset)) + "\" expected->\"" +
errln(UnicodeString("FAIL: applyPattern(\""+ pattern + "\").toPattern() => " + temppattern + " => pairs \""+ escape(getPairs(*tempset)) + "\", expected pairs \"" +
escape(getPairs(set)) + "\""));
} else{
logln(UnicodeString("OK: "+ pattern + "==>" + temppattern + ". Pairs \"" + escape(getPairs(*tempset)) + "\""));
logln(UnicodeString("Ok: applyPattern(\""+ pattern + "\").toPattern() => " + temppattern + " => pairs \"" + escape(getPairs(*tempset)) + "\""));
}
delete tempset;