Skip to content

Commit a965353

Browse files
committed
ICU-22995 Remove many casts made unnecessary and counterproductive
1 parent 5f7ee2e commit a965353

20 files changed

+81
-92
lines changed

icu4c/source/test/intltest/alphaindextst.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -601,11 +601,11 @@ void AlphabeticIndexTest::TestPinyinFirst() {
601601
index.addLabels(Locale::getChinese(), status);
602602
assertEquals("getBucketCount()", 28, index.getBucketCount(status)); // ... A-Z ...
603603
int32_t bucketIndex = index.getBucketIndex(UnicodeString(static_cast<char16_t>(0x897f)), status);
604-
assertEquals("getBucketIndex(U+897F)", static_cast<int32_t>(static_cast<char16_t>(0x0058) /*X*/ - static_cast<char16_t>(0x0041) /*A*/ + 1), bucketIndex);
604+
assertEquals("getBucketIndex(U+897F)", u'X' - u'A' + 1, bucketIndex);
605605
bucketIndex = index.getBucketIndex("i", status);
606606
assertEquals("getBucketIndex(i)", 9, bucketIndex);
607607
bucketIndex = index.getBucketIndex(UnicodeString(static_cast<char16_t>(0x03B1)), status);
608-
assertEquals("getBucketIndex(Greek alpha)", static_cast<int32_t>(27), bucketIndex);
608+
assertEquals("getBucketIndex(Greek alpha)", 27, bucketIndex);
609609
// U+50005 is an unassigned code point which sorts at the end, independent of the Hani group.
610610
bucketIndex = index.getBucketIndex(UnicodeString(static_cast<UChar32>(0x50005)), status);
611611
assertEquals("getBucketIndex(U+50005)", 27, bucketIndex);
@@ -668,8 +668,8 @@ void AlphabeticIndexTest::TestNoLabels() {
668668
index.addRecord(UnicodeString(static_cast<char16_t>(0x03B1)), nullptr, status);
669669
assertEquals("getBucketCount()", 1, index.getBucketCount(status)); // ...
670670
TEST_ASSERT(index.nextBucket(status));
671-
assertEquals("underflow label type", static_cast<int32_t>(U_ALPHAINDEX_UNDERFLOW), index.getBucketLabelType());
672-
assertEquals("all records in the underflow bucket", static_cast<int32_t>(3), index.getBucketRecordCount());
671+
assertEquals("underflow label type", U_ALPHAINDEX_UNDERFLOW, index.getBucketLabelType());
672+
assertEquals("all records in the underflow bucket", 3, index.getBucketRecordCount());
673673
}
674674

675675
void AlphabeticIndexTest::TestChineseZhuyin() {

icu4c/source/test/intltest/apicoll.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,9 +1573,9 @@ void CollationAPITest::TestVariableTopSetting() {
15731573
static_cast<int64_t>(newVarTop2), static_cast<int64_t>(newVarTop));
15741574

15751575
coll->setAttribute(UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, status);
1576-
assertEquals("empty==dollar", static_cast<int32_t>(UCOL_EQUAL), static_cast<int32_t>(coll->compare(UnicodeString(), dollar)));
1577-
assertEquals("empty==euro", static_cast<int32_t>(UCOL_EQUAL), static_cast<int32_t>(coll->compare(UnicodeString(), euro)));
1578-
assertEquals("dollar<zero", static_cast<int32_t>(UCOL_LESS), static_cast<int32_t>(coll->compare(dollar, UnicodeString(static_cast<char16_t>(0x30)))));
1576+
assertEquals("empty==dollar", UCOL_EQUAL, coll->compare(UnicodeString(), dollar));
1577+
assertEquals("empty==euro", UCOL_EQUAL, coll->compare(UnicodeString(), euro));
1578+
assertEquals("dollar<zero", UCOL_LESS, coll->compare(dollar, UnicodeString(static_cast<char16_t>(0x30))));
15791579

15801580
coll->setVariableTop(oldVarTop, status);
15811581

@@ -2383,7 +2383,7 @@ void CollationAPITest::TestCloneBinary() {
23832383
rbc->setAttribute(UCOL_STRENGTH, UCOL_PRIMARY, errorCode);
23842384
UnicodeString uUmlaut(static_cast<char16_t>(0xfc));
23852385
UnicodeString ue = UNICODE_STRING_SIMPLE("ue");
2386-
assertEquals("rbc/primary: u-umlaut==ue", static_cast<int32_t>(UCOL_EQUAL), rbc->compare(uUmlaut, ue, errorCode));
2386+
assertEquals("rbc/primary: u-umlaut==ue", UCOL_EQUAL, rbc->compare(uUmlaut, ue, errorCode));
23872387
uint8_t bin[25000];
23882388
int32_t binLength = rbc->cloneBinary(bin, UPRV_LENGTHOF(bin), errorCode);
23892389
if(errorCode.errDataIfFailureAndReset("rbc->cloneBinary()")) {
@@ -2395,8 +2395,8 @@ void CollationAPITest::TestCloneBinary() {
23952395
if(errorCode.errDataIfFailureAndReset("RuleBasedCollator(rbc binary)")) {
23962396
return;
23972397
}
2398-
assertEquals("rbc2.strength==primary", static_cast<int32_t>(UCOL_PRIMARY), rbc2.getAttribute(UCOL_STRENGTH, errorCode));
2399-
assertEquals("rbc2: u-umlaut==ue", static_cast<int32_t>(UCOL_EQUAL), rbc2.compare(uUmlaut, ue, errorCode));
2398+
assertEquals("rbc2.strength==primary", UCOL_PRIMARY, rbc2.getAttribute(UCOL_STRENGTH, errorCode));
2399+
assertEquals("rbc2: u-umlaut==ue", UCOL_EQUAL, rbc2.compare(uUmlaut, ue, errorCode));
24002400
assertTrue("rbc==rbc2", *rbc == rbc2);
24012401
uint8_t bin2[25000];
24022402
int32_t bin2Length = rbc2.cloneBinary(bin2, UPRV_LENGTHOF(bin2), errorCode);
@@ -2407,8 +2407,8 @@ void CollationAPITest::TestCloneBinary() {
24072407
if(errorCode.errDataIfFailureAndReset("RuleBasedCollator(rbc binary, length<0)")) {
24082408
return;
24092409
}
2410-
assertEquals("rbc3.strength==primary", static_cast<int32_t>(UCOL_PRIMARY), rbc3.getAttribute(UCOL_STRENGTH, errorCode));
2411-
assertEquals("rbc3: u-umlaut==ue", static_cast<int32_t>(UCOL_EQUAL), rbc3.compare(uUmlaut, ue, errorCode));
2410+
assertEquals("rbc3.strength==primary", UCOL_PRIMARY, rbc3.getAttribute(UCOL_STRENGTH, errorCode));
2411+
assertEquals("rbc3: u-umlaut==ue", UCOL_EQUAL, rbc3.compare(uUmlaut, ue, errorCode));
24122412
assertTrue("rbc==rbc3", *rbc == rbc3);
24132413
}
24142414

@@ -2432,7 +2432,7 @@ void CollationAPITest::TestIterNumeric() {
24322432
uiter_setUTF8(&iter40, "\x34\x30", 2);
24332433
uiter_setUTF8(&iter72, "\x37\x32", 2);
24342434
UCollationResult result = coll.compare(iter40, iter72, errorCode);
2435-
assertEquals("40<72", static_cast<int32_t>(UCOL_LESS), static_cast<int32_t>(result));
2435+
assertEquals("40<72", UCOL_LESS, result);
24362436
}
24372437

24382438
void CollationAPITest::TestBadKeywords() {

icu4c/source/test/intltest/calregts.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,7 @@ void CalendarRegressionTest::Test13745()
15611561
errln("%s:%d Failure setting INT32_MAX+1 change on calendar: %s\n", __FILE__, __LINE__, u_errorName(status));
15621562
return;
15631563
}
1564-
assertEquals("getGregorianChange()", static_cast<double>(INT32_MAX) * MILLIS_IN_DAY, cal->getGregorianChange());
1564+
assertEquals("getGregorianChange()", INT32_MAX * MILLIS_IN_DAY, cal->getGregorianChange());
15651565

15661566
// test underflow
15671567
cal->setGregorianChange((static_cast<double>(INT32_MIN) - 1.0) * MILLIS_IN_DAY, status);

icu4c/source/test/intltest/convtest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ ConversionTest::TestUTF8ToUTF8Overflow() {
816816
assertEquals("illFormed number of bytes written", 0, length);
817817
errorLength = UPRV_LENGTHOF(errorBytes);
818818
ucnv_getInvalidChars(cnv1.getAlias(), errorBytes, &errorLength, errorCode);
819-
assertEquals("illFormed truncated errorLength", 2, static_cast<int32_t>(errorLength));
819+
assertEquals("illFormed truncated errorLength", 2, errorLength);
820820
if (errorLength == 2) {
821821
assertEquals("illFormed truncated errorBytes", 0xf191,
822822
(static_cast<int32_t>(static_cast<uint8_t>(errorBytes[0])) << 8) | static_cast<uint8_t>(errorBytes[1]));
@@ -833,7 +833,7 @@ ConversionTest::TestUTF8ToUTF8Overflow() {
833833
assertEquals("illFormed trail byte number of bytes written", 0, length);
834834
errorLength = UPRV_LENGTHOF(errorBytes);
835835
ucnv_getInvalidChars(cnv1.getAlias(), errorBytes, &errorLength, errorCode);
836-
assertEquals("illFormed trail byte errorLength", 1, static_cast<int32_t>(errorLength));
836+
assertEquals("illFormed trail byte errorLength", 1, errorLength);
837837
if (errorLength == 1) {
838838
assertEquals("illFormed trail byte errorBytes", 0x93, static_cast<int32_t>(static_cast<uint8_t>(errorBytes[0])));
839839
}

icu4c/source/test/intltest/dcfmapts.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void IntlTestDecimalFormatAPI::testAPI(/*char *par*/)
137137
DecimalFormat df("0", {"en", status}, status);
138138
UnicodeString result;
139139
assertEquals("pat 0: ", 0, df.getGroupingSize());
140-
assertEquals("pat 0: ", static_cast<UBool>(false), df.isGroupingUsed());
140+
assertEquals("pat 0: ", false, df.isGroupingUsed());
141141
df.setGroupingUsed(false);
142142
assertEquals("pat 0 then disabled: ", 0, df.getGroupingSize());
143143
assertEquals("pat 0 then disabled: ", u"1111", df.format(1111, result.remove()));
@@ -149,7 +149,7 @@ void IntlTestDecimalFormatAPI::testAPI(/*char *par*/)
149149
DecimalFormat df("#,##0", {"en", status}, status);
150150
UnicodeString result;
151151
assertEquals("pat #,##0: ", 3, df.getGroupingSize());
152-
assertEquals("pat #,##0: ", static_cast<UBool>(true), df.isGroupingUsed());
152+
assertEquals("pat #,##0: ", true, df.isGroupingUsed());
153153
df.setGroupingUsed(false);
154154
assertEquals("pat #,##0 then disabled: ", 3, df.getGroupingSize());
155155
assertEquals("pat #,##0 then disabled: ", u"1111", df.format(1111, result.remove()));

icu4c/source/test/intltest/loctest.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4372,7 +4372,7 @@ LocaleTest::TestCreateKeywordSet() {
43724372
status);
43734373
status.errIfFailureAndReset("\"%s\"", l.getName());
43744374

4375-
assertEquals("set::size()", 2, static_cast<int32_t>(result.size()));
4375+
assertEquals("set::size()", 2, result.size());
43764376
assertTrue("set::find(\"calendar\")",
43774377
result.find("calendar") != result.end());
43784378
assertTrue("set::find(\"collation\")",
@@ -4391,7 +4391,7 @@ LocaleTest::TestCreateKeywordSetEmpty() {
43914391
status);
43924392
status.errIfFailureAndReset("\"%s\"", l.getName());
43934393

4394-
assertEquals("set::size()", 0, static_cast<int32_t>(result.size()));
4394+
assertEquals("set::size()", 0, result.size());
43954395
}
43964396

43974397
void
@@ -4427,7 +4427,7 @@ LocaleTest::TestCreateUnicodeKeywordSet() {
44274427
status);
44284428
status.errIfFailureAndReset("\"%s\"", l.getName());
44294429

4430-
assertEquals("set::size()", 2, static_cast<int32_t>(result.size()));
4430+
assertEquals("set::size()", 2, result.size());
44314431
assertTrue("set::find(\"ca\")",
44324432
result.find("ca") != result.end());
44334433
assertTrue("set::find(\"co\")",
@@ -4451,7 +4451,7 @@ LocaleTest::TestCreateUnicodeKeywordSetEmpty() {
44514451
status);
44524452
status.errIfFailureAndReset("\"%s\"", l.getName());
44534453

4454-
assertEquals("set::size()", 0, static_cast<int32_t>(result.size()));
4454+
assertEquals("set::size()", 0, result.size());
44554455

44564456
LocalPointer<StringEnumeration> se(l.createUnicodeKeywords(status), status);
44574457
assertTrue("createUnicodeKeywords", se.isNull());
@@ -4476,7 +4476,7 @@ LocaleTest::TestCreateUnicodeKeywordSetWithPrivateUse() {
44764476
result.find("x") == result.end());
44774477
assertTrue("getUnicodeKeywords set::find(\"foo\")",
44784478
result.find("foo") == result.end());
4479-
assertEquals("set::size()", 1, static_cast<int32_t>(result.size()));
4479+
assertEquals("set::size()", 1, result.size());
44804480

44814481
LocalPointer<StringEnumeration> se(l.createUnicodeKeywords(status), status);
44824482
status.errIfFailureAndReset("\"%s\" createUnicodeKeywords()", l.getName());

icu4c/source/test/intltest/normconf.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -511,13 +511,14 @@ UBool NormalizerConformanceTest::checkNorm(UNormalizationMode mode, int32_t opti
511511

512512
// Do the Edits cover the entire input & output?
513513
UBool pass = true;
514-
pass &= assertEquals("edits.hasChanges()", static_cast<UBool>(s8 != out8), edits.hasChanges());
514+
pass &= assertEquals("edits.hasChanges()", s8 != out8, edits.hasChanges());
515515
pass &= assertEquals("edits.lengthDelta()",
516-
static_cast<int32_t>(out8.length() - s8.length()), edits.lengthDelta());
516+
static_cast<int64_t>(out8.length()) - static_cast<int64_t>(s8.length()),
517+
edits.lengthDelta());
517518
Edits::Iterator iter = edits.getCoarseIterator();
518519
while (iter.next(errorCode)) {}
519-
pass &= assertEquals("edits source length", static_cast<int32_t>(s8.length()), iter.sourceIndex());
520-
pass &= assertEquals("edits destination length", static_cast<int32_t>(out8.length()), iter.destinationIndex());
520+
pass &= assertEquals("edits source length", s8.length(), iter.sourceIndex());
521+
pass &= assertEquals("edits destination length", out8.length(), iter.destinationIndex());
521522
return pass;
522523
}
523524

icu4c/source/test/intltest/numbertest_decimalquantity.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ void DecimalQuantityTest::testMaxDigits() {
431431
assertEquals("Should trim, toPlainString", "76.54", dq.toPlainString());
432432
assertEquals("Should trim, toScientificString", "7.654E+1", dq.toScientificString());
433433
assertEquals("Should trim, toLong", 76LL, dq.toLong(true));
434-
assertEquals("Should trim, toFractionLong", static_cast<int64_t>(54), static_cast<int64_t>(dq.toFractionLong(false)));
434+
assertEquals("Should trim, toFractionLong", 54, dq.toFractionLong(false));
435435
assertEquals("Should trim, toDouble", 76.54, dq.toDouble());
436436
// To test DecNum output, check the round-trip.
437437
DecNum dn;

icu4c/source/test/intltest/numfmtst.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8197,7 +8197,7 @@ void NumberFormatTest::TestCurrencyUsage() {
81978197

81988198
// test the getter here
81998199
UCurrencyUsage curUsage = fmt->getCurrencyUsage();
8200-
assertEquals("Test usage getter - standard", static_cast<int32_t>(curUsage), static_cast<int32_t>(UCURR_USAGE_STANDARD));
8200+
assertEquals("Test usage getter - standard", curUsage, UCURR_USAGE_STANDARD);
82018201

82028202
fmt->setCurrencyUsage(UCURR_USAGE_CASH, &status);
82038203
}else{
@@ -8209,7 +8209,7 @@ void NumberFormatTest::TestCurrencyUsage() {
82098209

82108210
// must be usage = cash
82118211
UCurrencyUsage curUsage = fmt->getCurrencyUsage();
8212-
assertEquals("Test usage getter - cash", static_cast<int32_t>(curUsage), static_cast<int32_t>(UCURR_USAGE_CASH));
8212+
assertEquals("Test usage getter - cash", curUsage, UCURR_USAGE_CASH);
82138213

82148214
UnicodeString cash_currency;
82158215
fmt->format(agent,cash_currency);
@@ -9031,9 +9031,9 @@ void NumberFormatTest::TestFormatFailIfMoreThanMaxDigits() {
90319031
if (status.errDataIfFailureAndReset()) {
90329032
return;
90339033
}
9034-
assertEquals("Coverage for getter 1", static_cast<UBool>(false), df.isFormatFailIfMoreThanMaxDigits());
9034+
assertEquals("Coverage for getter 1", false, df.isFormatFailIfMoreThanMaxDigits());
90359035
df.setFormatFailIfMoreThanMaxDigits(true);
9036-
assertEquals("Coverage for getter 2", static_cast<UBool>(true), df.isFormatFailIfMoreThanMaxDigits());
9036+
assertEquals("Coverage for getter 2", true, df.isFormatFailIfMoreThanMaxDigits());
90379037
df.setMaximumIntegerDigits(2);
90389038
UnicodeString result;
90399039
df.format(1234, result, status);
@@ -9047,9 +9047,9 @@ void NumberFormatTest::TestParseCaseSensitive() {
90479047
if (status.errDataIfFailureAndReset()) {
90489048
return;
90499049
}
9050-
assertEquals("Coverage for getter 1", static_cast<UBool>(false), df.isParseCaseSensitive());
9050+
assertEquals("Coverage for getter 1", false, df.isParseCaseSensitive());
90519051
df.setParseCaseSensitive(true);
9052-
assertEquals("Coverage for getter 1", static_cast<UBool>(true), df.isParseCaseSensitive());
9052+
assertEquals("Coverage for getter 1", true, df.isParseCaseSensitive());
90539053
Formattable result;
90549054
ParsePosition ppos;
90559055
df.parse(u"1e2", result, ppos);
@@ -9064,9 +9064,9 @@ void NumberFormatTest::TestParseNoExponent() {
90649064
if (status.errDataIfFailureAndReset()) {
90659065
return;
90669066
}
9067-
assertEquals("Coverage for getter 1", static_cast<UBool>(false), df.isParseNoExponent());
9067+
assertEquals("Coverage for getter 1", false, df.isParseNoExponent());
90689068
df.setParseNoExponent(true);
9069-
assertEquals("Coverage for getter 1", static_cast<UBool>(true), df.isParseNoExponent());
9069+
assertEquals("Coverage for getter 1", true, df.isParseNoExponent());
90709070
Formattable result;
90719071
ParsePosition ppos;
90729072
df.parse(u"1E2", result, ppos);
@@ -9081,9 +9081,9 @@ void NumberFormatTest::TestSignAlwaysShown() {
90819081
if (status.errDataIfFailureAndReset()) {
90829082
return;
90839083
}
9084-
assertEquals("Coverage for getter 1", static_cast<UBool>(false), df.isSignAlwaysShown());
9084+
assertEquals("Coverage for getter 1", false, df.isSignAlwaysShown());
90859085
df.setSignAlwaysShown(true);
9086-
assertEquals("Coverage for getter 1", static_cast<UBool>(true), df.isSignAlwaysShown());
9086+
assertEquals("Coverage for getter 1", true, df.isSignAlwaysShown());
90879087
UnicodeString result;
90889088
df.format(1234, result, status);
90899089
status.errIfFailureAndReset();

icu4c/source/test/intltest/pluralmaptest.cpp

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,16 @@ void PluralMapTest::runIndexedTest(int32_t index, UBool exec, const char* &name,
5656
}
5757

5858
void PluralMapTest::TestToCategory() {
59-
assertEquals("", static_cast<int32_t>(PluralMapBase::OTHER), PluralMapBase::toCategory("other"));
60-
assertEquals("", static_cast<int32_t>(PluralMapBase::ZERO), PluralMapBase::toCategory("zero"));
61-
assertEquals("", static_cast<int32_t>(PluralMapBase::ONE), PluralMapBase::toCategory("one"));
62-
assertEquals("", static_cast<int32_t>(PluralMapBase::TWO), PluralMapBase::toCategory("two"));
63-
assertEquals("", static_cast<int32_t>(PluralMapBase::FEW), PluralMapBase::toCategory("few"));
64-
assertEquals("", static_cast<int32_t>(PluralMapBase::MANY), PluralMapBase::toCategory("many"));
65-
assertEquals("", static_cast<int32_t>(PluralMapBase::NONE), PluralMapBase::toCategory("Many"));
66-
assertEquals(
67-
"",
68-
static_cast<int32_t>(PluralMapBase::FEW),
69-
PluralMapBase::toCategory(UnicodeString("few")));
70-
assertEquals(
71-
"",
72-
static_cast<int32_t>(PluralMapBase::MANY),
73-
PluralMapBase::toCategory(UnicodeString("many")));
74-
assertEquals(
75-
"",
76-
static_cast<int32_t>(PluralMapBase::NONE),
77-
PluralMapBase::toCategory(UnicodeString("Many")));
59+
assertEquals("", PluralMapBase::OTHER, PluralMapBase::toCategory("other"));
60+
assertEquals("", PluralMapBase::ZERO, PluralMapBase::toCategory("zero"));
61+
assertEquals("", PluralMapBase::ONE, PluralMapBase::toCategory("one"));
62+
assertEquals("", PluralMapBase::TWO, PluralMapBase::toCategory("two"));
63+
assertEquals("", PluralMapBase::FEW, PluralMapBase::toCategory("few"));
64+
assertEquals("", PluralMapBase::MANY, PluralMapBase::toCategory("many"));
65+
assertEquals("", PluralMapBase::NONE, PluralMapBase::toCategory("Many"));
66+
assertEquals("", PluralMapBase::FEW, PluralMapBase::toCategory(UnicodeString("few")));
67+
assertEquals("", PluralMapBase::MANY, PluralMapBase::toCategory(UnicodeString("many")));
68+
assertEquals("", PluralMapBase::NONE, PluralMapBase::toCategory(UnicodeString("Many")));
7869
}
7970

8071
void PluralMapTest::TestGetCategoryName() {
@@ -117,24 +108,24 @@ void PluralMapTest::TestIterate() {
117108
PluralMapBase::Category index = PluralMapBase::NONE;
118109
const UnicodeString *current = map.next(index);
119110
assertEquals("", "pickles", *current);
120-
assertEquals("", static_cast<int32_t>(PluralMapBase::OTHER), index);
111+
assertEquals("", PluralMapBase::OTHER, index);
121112
current = map.next(index);
122113
assertEquals("", "pickle", *current);
123-
assertEquals("", static_cast<int32_t>(PluralMapBase::ONE), index);
114+
assertEquals("", PluralMapBase::ONE, index);
124115
current = map.next(index);
125116
assertEquals("", "picklefew", *current);
126-
assertEquals("", static_cast<int32_t>(PluralMapBase::FEW), index);
117+
assertEquals("", PluralMapBase::FEW, index);
127118
current = map.next(index);
128-
assertEquals("", static_cast<int32_t>(PluralMapBase::CATEGORY_COUNT), index);
119+
assertEquals("", PluralMapBase::CATEGORY_COUNT, index);
129120
assertTrue("", current == nullptr);
130121

131122
PluralMapForPluralMapTest map2;
132123
index = PluralMapBase::NONE;
133124
current = map2.next(index);
134125
assertEquals("", "", *current);
135-
assertEquals("", static_cast<int32_t>(PluralMapBase::OTHER), index);
126+
assertEquals("", PluralMapBase::OTHER, index);
136127
current = map2.next(index);
137-
assertEquals("", static_cast<int32_t>(PluralMapBase::CATEGORY_COUNT), index);
128+
assertEquals("", PluralMapBase::CATEGORY_COUNT, index);
138129
assertTrue("", current == nullptr);
139130
}
140131

0 commit comments

Comments
 (0)