Lines Matching defs:pattern

133         // {sfb} use double format in pattern, so result will match (not strictly necessary)
134 final String pattern = "There {0,choice,0.0#are no files|1.0#is one file|1.0<are {0, number} files} on disk {1}. ";
135 logln("The input pattern : " + pattern);
137 MessageFormat fmt = new MessageFormat(pattern);
138 assertEquals("toPattern", pattern, fmt.toPattern());
140 errln("MessageFormat pattern creation failed.");
162 // ICU 4.8 returns the original pattern (testCases)
163 // rather than toPattern() reconstituting a new, equivalent pattern string (testResultPatterns).
199 // ICU 4.8 returns the original pattern (testCases)
200 // rather than toPattern() reconstituting a new, equivalent pattern string (testResultPatterns).
220 // logln("MSG pattern for parse: " + buffer);
786 final String pattern =
794 MessageFormat msg = new MessageFormat(pattern);
847 logln("Testing format pattern: '" + formats[i] + "'");
950 // Test the fix pattern api
952 final String[] patterns = { // new pattern, expected pattern
1342 String pattern = patterns[i];
1343 MessageFormat mf = new MessageFormat(pattern);
1346 errln("message formats not equal for pattern:\n*** '" + pattern + "'\n*** '" +
1356 String pattern = null;
1359 //Create the MessageFormat with simple French pattern
1360 pattern = "{0} est {1, select, female {all\\u00E9e} other {all\\u00E9}} \\u00E0 Paris.";
1361 msgFmt = new MessageFormat(pattern);
1362 assertNotNull( "ERROR:Failure in constructing with simple French pattern", msgFmt);
1381 pattern = "{0} est {1, select, female {all\\u00E9e c''est} other {all\\u00E9 c''est}} \\u00E0 Paris.";
1382 msgFmt = new MessageFormat(pattern);
1383 assertNotNull( "ERROR:Failure in constructing with quoted French pattern", msgFmt);
1403 pattern = "{0} est {1, select, female {{2,number,integer} all\\u00E9e} other {all\\u00E9}} \\u00E0 Paris.";
1404 msgFmt = new MessageFormat(pattern);
1405 assertNotNull( "ERROR:Failure in constructing with nested pattern 1", msgFmt);
1425 pattern = "{0} {1, plural, one {est {2, select, female {all\\u00E9e} other {all\\u00E9}}} other {sont {2, select, female {all\\u00E9es} other {all\\u00E9s}}}} \\u00E0 Paris.";
1426 msgFmt = new MessageFormat(pattern);
1427 assertNotNull( "ERROR:Failure in constructing with nested pattern 2", msgFmt);
1448 pattern = "{0} und {1, select, female {{2, plural, one {{3, select, female {ihre Freundin} other {ihr Freund}} } other {ihre {2, number, integer} {3, select, female {Freundinnen} other {Freunde}} } }} other{{2, plural, one {{3, select, female {seine Freundin} other {sein Freund}}} other {seine {2, number, integer} {3, select, female {Freundinnen} other {Freunde}}}}} } gingen nach Paris.";
1449 msgFmt = new MessageFormat(pattern);
1450 assertNotNull( "ERROR:Failure in constructing with nested pattern 3", msgFmt);
1505 //Quoted French pattern
1510 String pattern = patterns[i];
1511 MessageFormat mf = new MessageFormat(pattern);
1514 errln("message formats not equal for pattern:\n*** '"
1515 + pattern + "'\n*** '" + mf.toPattern() + "'");
1715 public String getPatternAndSkipSyntax(MessagePattern pattern) {
1716 StringBuilder sb = new StringBuilder(pattern.getPatternString());
1717 int count = pattern.countParts();
1719 MessagePattern.Part part = pattern.getPart(--i);
1736 assertNotEquals("MessagePatterns with different ApostropheMode (no pattern)", ado_mp, adr_mp);
1742 // DOUBLE_OPTIONAL pattern
1743 // DOUBLE_REQUIRED pattern (null=same as DOUBLE_OPTIONAL)
1767 // The JDK performs only one apostrophe-quoting pass on this pattern.
1768 String pattern = "ab{0,choice,0#1'2''3'''4''''.}yz";
1770 new java.text.MessageFormat(pattern, Locale.ENGLISH);
1773 compMsg.applyPattern(pattern, MessagePattern.ApostropheMode.DOUBLE_REQUIRED);
1779 icuMsg.applyPattern(pattern, MessagePattern.ApostropheMode.DOUBLE_OPTIONAL);
1797 pattern = "ab{0,choice,0#1'2''3'''4''''.{0,number,'#x'}}yz";
1798 jdkMsg.applyPattern(pattern);
1799 compMsg.applyPattern(pattern);
1800 icuMsg.applyPattern(pattern);
1812 // The JDK fails to parse this pattern.
1814 // For lack of comparison, we do not test ICU with this pattern.