Skip to content

Commit

Permalink
Simplify assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
catamorphism committed Sep 19, 2024
1 parent 135a911 commit a9a6de2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions icu4c/source/test/intltest/messageformat2test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,7 @@ void TestMessageFormat2::testHighLoneSurrogate() {
.setPattern(loneSurrogate, pe, errorCode)
.build(errorCode);
UnicodeString result = msgfmt1.formatToString({}, errorCode);
assertEquals("testHighLoneSurrogate", U_MF_SYNTAX_ERROR, errorCode);
errorCode.reset();
errorCode.expectErrorAndReset(U_MF_SYNTAX_ERROR, "testHighLoneSurrogate");
}

// ICU-22890 lone surrogate cause infinity loop
Expand All @@ -291,8 +290,7 @@ void TestMessageFormat2::testLowLoneSurrogate() {
.setPattern(loneSurrogate, pe, errorCode)
.build(errorCode);
UnicodeString result = msgfmt2.formatToString({}, errorCode);
assertEquals("testLowLoneSurrogate", U_MF_SYNTAX_ERROR, errorCode);
errorCode.reset();
errorCode.expectErrorAndReset(U_MF_SYNTAX_ERROR, "testLowLoneSurrogate");
}

void TestMessageFormat2::dataDrivenTests() {
Expand Down

0 comments on commit a9a6de2

Please sign in to comment.