Skip to content

Commit

Permalink
ICU-22889 Addressed George's concerns.
Browse files Browse the repository at this point in the history
  • Loading branch information
richgillam committed Sep 17, 2024
1 parent 5c04df6 commit 8239c6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions icu4c/source/test/intltest/itrbnf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2623,11 +2623,12 @@ IntlTestRBNF::TestInfiniteRecursion() {
if (U_SUCCESS(err)) {
UnicodeString result;
rbnf.format(5, result);
// we don't actually care about the result; we just want to make sure the function returns
// we don't actually care about the result and the function doesn't return an error code;
// we just want to make sure the function returns

Formattable pResult;
rbnf.parse("foo", pResult, err);
// we don't actually care about the result; we just want to make sure the function returns
assertTrue("rbnf.parse() didn't return U_INVALID_FORMAT_ERROR!", err = U_INVALID_FORMAT_ERROR);
} else {
// eventually it'd be nice to statically analyze the rules for (at least) the most common
// causes of infinite recursion, in which case we'd end up down here and need to check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,7 @@ public void TestInfiniteRecursion() {

try {
rbnf.parse("foo");
// we don't actually care about the result; we just want to make sure the function returns
errln("Parse test didn't throw an exception!");
} catch (IllegalStateException e) {
// we're supposed to get an IllegalStateException; swallow it and continue
} catch (ParseException e) {
Expand Down

0 comments on commit 8239c6f

Please sign in to comment.