+
+ // Check expectFailure
+ helper.expectedErrln = u"EEE expected: U_ILLEGAL_CHAR_FOUND but got error: U_ILLEGAL_PAD_POSITION";
+ helper.expectedDataErr = FALSE;
+ helper.seenError = FALSE;
+ {
+ IcuTestErrorCode testStatus(helper, "EEE");
+ testStatus.set(U_ILLEGAL_PAD_POSITION);
+ testStatus.expectErrorAndReset(U_ILLEGAL_PAD_POSITION);
+ assertFalse("Should NOT have seen an error", helper.seenError);
+ testStatus.set(U_ILLEGAL_PAD_POSITION);
+ testStatus.expectErrorAndReset(U_ILLEGAL_CHAR_FOUND);
+ assertTrue("Should have seen an error", helper.seenError);
+ helper.seenError = FALSE;
+ helper.expectedErrln = u"EEE expected: U_ILLEGAL_CHAR_FOUND but got error: U_ZERO_ERROR scope: scopety scope - 5.4300";
+ testStatus.setScope("scopety scope");
+ testStatus.set(U_ILLEGAL_PAD_POSITION);
+ testStatus.expectErrorAndReset(U_ILLEGAL_PAD_POSITION, "%6.4f", 5.43);
+ assertFalse("Should NOT have seen an error", helper.seenError);
+ testStatus.expectErrorAndReset(U_ILLEGAL_CHAR_FOUND, "%6.4f", 5.43);
+ assertTrue("Should have seen an error", helper.seenError);
+ }