| 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",
|
|
|