From 02f78e8bbb2178715945114b8eaef34e29d79c9f Mon Sep 17 00:00:00 2001 From: Travis Keep Date: Thu, 11 Sep 2014 17:31:56 +0000 Subject: [PATCH] ICU-11250 Add test for SimplePatternFormatter.getPatternWithNoPlaceholders. X-SVN-Rev: 36465 --- .../ibm/icu/dev/test/util/SimplePatternFormatterTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/SimplePatternFormatterTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/SimplePatternFormatterTest.java index 3ff2aef7e2..b597aba2c6 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/SimplePatternFormatterTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/SimplePatternFormatterTest.java @@ -70,6 +70,14 @@ public class SimplePatternFormatterTest extends TestFmwk { SimplePatternFormatter.compile("{0} meter").format("1")); } + public void TestGetPatternWithNoPlaceholders() { + assertEquals( + "", + "Templates and are here.", + SimplePatternFormatter.compile( + "Templates {1}{2} and {3} are here.").getPatternWithNoPlaceholders()); + } + public void TestWithPlaceholders() { SimplePatternFormatter fmt = SimplePatternFormatter.compile( "Templates {2}{1} and {4} are out of order.");