Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1196)

Unified Diff: source/test/intltest/quantityformattertest.cpp

Issue 1621943002: ICU 56 step 4: Apply post-56 fixes for measure/date format (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@56goog
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/test/intltest/measfmttest.cpp ('k') | source/test/intltest/reldatefmttest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/test/intltest/quantityformattertest.cpp
diff --git a/source/test/intltest/quantityformattertest.cpp b/source/test/intltest/quantityformattertest.cpp
index 0167075f5bc5babbd82a2424d0e06b79d44ecf5f..c641de2a686f52b011443859788c41c9e17fe6f4 100644
--- a/source/test/intltest/quantityformattertest.cpp
+++ b/source/test/intltest/quantityformattertest.cpp
@@ -1,7 +1,7 @@
/*
*******************************************************************************
-* Copyright (C) 2014, International Business Machines Corporation and *
-* others. All Rights Reserved. *
+* Copyright (C) 2014-2015, International Business Machines Corporation and
+* others. All Rights Reserved.
*******************************************************************************
*
* File QUANTITYFORMATTERTEST.CPP
@@ -37,25 +37,25 @@ void QuantityFormatterTest::TestBasic() {
QuantityFormatter fmt;
assertFalse(
"adding bad variant",
- fmt.add("a bad variant", "{0} pounds", status));
+ fmt.addIfAbsent("a bad variant", "{0} pounds", status));
assertEquals("adding bad variant status", U_ILLEGAL_ARGUMENT_ERROR, status);
status = U_ZERO_ERROR;
assertFalse(
"Adding bad pattern",
- fmt.add("other", "{0} {1} too many placeholders", status));
+ fmt.addIfAbsent("other", "{0} {1} too many placeholders", status));
assertEquals("adding bad pattern status", U_ILLEGAL_ARGUMENT_ERROR, status);
status = U_ZERO_ERROR;
assertFalse("isValid with no patterns", fmt.isValid());
assertTrue(
"Adding good pattern with no placeholders",
- fmt.add("other", "no placeholder", status));
+ fmt.addIfAbsent("zero", "no placeholder", status));
assertTrue(
"Adding good pattern",
- fmt.add("other", "{0} pounds", status));
+ fmt.addIfAbsent("other", "{0} pounds", status));
assertTrue("isValid with other", fmt.isValid());
assertTrue(
"Adding good pattern",
- fmt.add("one", "{0} pound", status));
+ fmt.addIfAbsent("one", "{0} pound", status));
assertEquals(
"getByVariant",
« no previous file with comments | « source/test/intltest/measfmttest.cpp ('k') | source/test/intltest/reldatefmttest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698