/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/regex/ |
D | ReplaceTest.java | 29 String target, pattern, repl; in testSimpleReplace() local 32 pattern = "fo[^o]"; in testSimpleReplace() 35 Pattern p = Pattern.compile(pattern); in testSimpleReplace() 43 String target, pattern, repl, s; in testCaptureReplace() local 48 pattern = "\\[([0-9]+)\\]([a-z]+)"; in testCaptureReplace() 51 p = Pattern.compile(pattern); in testCaptureReplace() 59 pattern = "\\[([0-9]+)\\]([a-z]+)\\(([0-9]+)\\)([a-z]+)\\{([0-9]+)\\}([a-z]+)"; in testCaptureReplace() 61 p = Pattern.compile(pattern); in testCaptureReplace() 76 String target, pattern, repl, s; in testEscapeReplace() local 79 pattern = "'"; in testEscapeReplace() [all …]
|
D | MatcherTest.java | 104 String pattern = "a*b"; in testReplaceAll() local 105 Pattern pat = Pattern.compile(pattern); in testReplaceAll() 139 String pattern = "dog"; in testReplaceFirst() local 140 Pattern pat = Pattern.compile(pattern); in testReplaceFirst() 167 assertEquals(test, test.matcher("aaa").pattern()); in testPattern() 172 .pattern().toString()); in testPattern() 341 assertTrue("Match expected, but failed: " + pat.pattern() in testMatchesQuantifiers() 345 + pat.pattern() + " : " + stringSingles[i][j * 2 + 1], in testMatchesQuantifiers() 353 assertTrue("Match expected, but failed: " + pat.pattern() in testMatchesQuantifiers() 358 + pat.pattern() + " : " in testMatchesQuantifiers() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | SimpleDateFormatTest.java | 130 String pattern = "GyMdkHmsSEDFwWahKzZLc"; in test_applyLocalizedPatternLjava_lang_String() local 131 f2.applyLocalizedPattern(pattern); in test_applyLocalizedPatternLjava_lang_String() 132 assertEquals(pattern, f2.toPattern()); in test_applyLocalizedPatternLjava_lang_String() 133 assertEquals(pattern, f2.toLocalizedPattern()); in test_applyLocalizedPatternLjava_lang_String() 394 private void assertFormat(SimpleDateFormat format, String pattern, Calendar cal, in assertFormat() argument 398 format.applyPattern(pattern); in assertFormat() 401 assertTrue("Wrong format: \"" + pattern + "\" expected: " + expected + " result: " + result, in assertFormat() 403 assertEquals("Wrong begin position: " + pattern + "\n" + "expected: " + expected + "\n" + in assertFormat() 405 assertTrue("Wrong end position: " + pattern + " expected: " + expected + " field: " + field, in assertFormat() 686 String pattern = "dd MMMM yyyy EEEE"; in test_parse_dd_MMMM_yyyy_EEEE() local [all …]
|
/libcore/ojluni/src/main/java/java/util/logging/ |
D | FileHandler.java | 156 private String pattern; field in FileHandler 226 pattern = manager.getStringProperty(cname + ".pattern", "%h/java%u.log"); in configure() 284 public FileHandler(String pattern) throws IOException, SecurityException { in FileHandler() argument 285 if (pattern.length() < 1 ) { in FileHandler() 290 this.pattern = pattern; in FileHandler() 316 public FileHandler(String pattern, boolean append) throws IOException, in FileHandler() argument 318 if (pattern.length() < 1 ) { in FileHandler() 323 this.pattern = pattern; in FileHandler() 353 public FileHandler(String pattern, int limit, int count) in FileHandler() argument 355 if (limit < 0 || count < 1 || pattern.length() < 1) { in FileHandler() [all …]
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | DecimalFormatTest.java | 323 private static void assertCurrencyFormat(String expected, String pattern, in assertCurrencyFormat() argument 326 DecimalFormat df = new DecimalFormat(pattern, dfs); in assertCurrencyFormat() 329 assertEquals("Not formatted as expected with pattern " + pattern + " in locale " + locale, in assertCurrencyFormat() 428 String pattern = "0\u2030"; in testPerMill() local 435 android.icu.text.DecimalFormat df = new android.icu.text.DecimalFormat(pattern, in testPerMill() 439 for (DecimalFormat df : createDecimalFormatInstances(locale, pattern)) { in testPerMill() 446 assertEquals("100;", new DecimalFormat(pattern, dfs).format(number)); in testPerMill() 451 android.icu.text.DecimalFormat df = new android.icu.text.DecimalFormat(pattern, in testPerMill() 458 for (DecimalFormat df : createDecimalFormatInstances(locale, pattern)) { in testPerMill() 468 android.icu.text.DecimalFormat df = new android.icu.text.DecimalFormat(pattern, in testPerMill() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestZoneOffsetParser.java | 89 …public void test_parse_error(String pattern, String noOffsetText, String text, int pos, Class<?> e… in test_parse_error() argument 91 getFormatter(pattern, noOffsetText).parseUnresolved(text, new ParsePosition(pos)); in test_parse_error() 232 …public void test_parse_exactMatch(String pattern, String parse, ZoneOffset expected) throws Except… in test_parse_exactMatch() argument 234 TemporalAccessor parsed = getFormatter(pattern, "Z").parseUnresolved(parse, pos); in test_parse_exactMatch() 240 …public void test_parse_startStringMatch(String pattern, String parse, ZoneOffset expected) throws … in test_parse_startStringMatch() argument 242 TemporalAccessor parsed = getFormatter(pattern, "Z").parseUnresolved(parse + ":OTHER", pos); in test_parse_startStringMatch() 248 …public void test_parse_midStringMatch(String pattern, String parse, ZoneOffset expected) throws Ex… in test_parse_midStringMatch() argument 250 …TemporalAccessor parsed = getFormatter(pattern, "Z").parseUnresolved("OTHER" + parse + ":OTHER", p… in test_parse_midStringMatch() 256 …public void test_parse_endStringMatch(String pattern, String parse, ZoneOffset expected) throws Ex… in test_parse_endStringMatch() argument 258 TemporalAccessor parsed = getFormatter(pattern, "Z").parseUnresolved("OTHER" + parse, pos); in test_parse_endStringMatch() [all …]
|
D | TestZoneOffsetPrinter.java | 151 public void test_format(String pattern, String expected, ZoneOffset offset) throws Exception { in test_format() argument 153 getFormatter(pattern, "NO-OFFSET").formatTo(offset, buf); in test_format() 158 public void test_toString(String pattern, String expected, ZoneOffset offset) throws Exception { in test_toString() argument 159 …assertEquals(getFormatter(pattern, "NO-OFFSET").toString(), "Offset(" + pattern + ",'NO-OFFSET')"); in test_toString() local
|
/libcore/ojluni/src/main/java/java/text/ |
D | PatternEntry.java | 199 private String pattern; field in PatternEntry.Parser 202 public Parser(String pattern) { in Parser() argument 203 this.pattern = pattern; in Parser() 216 while (i < pattern.length()) { in next() 217 char ch = pattern.charAt(i); in next() 245 ch = pattern.charAt(++i); in next() 254 pattern.substring(i, in next() 255 (i+10 < pattern.length()) ? in next() 256 i+10 : pattern.length()), in next() 276 pattern.substring(i, in next() [all …]
|
D | MessageFormat.java | 361 public MessageFormat(String pattern) { in MessageFormat() argument 363 applyPattern(pattern); in MessageFormat() 379 public MessageFormat(String pattern, Locale locale) { in MessageFormat() argument 381 applyPattern(pattern); in MessageFormat() 426 public void applyPattern(String pattern) { in applyPattern() argument 437 for (int i = 0; i < pattern.length(); ++i) { in applyPattern() 438 char ch = pattern.charAt(i); in applyPattern() 441 if (i + 1 < pattern.length() in applyPattern() 442 && pattern.charAt(i+1) == '\'') { in applyPattern() 511 this.pattern = segments[0].toString(); in applyPattern() [all …]
|
D | MergeCollation.java | 69 public MergeCollation(String pattern) throws ParseException in MergeCollation() argument 73 setPattern(pattern); in MergeCollation() 163 public void setPattern(String pattern) throws ParseException in setPattern() argument 166 addPattern(pattern); in setPattern() 173 public void addPattern(String pattern) throws ParseException in addPattern() argument 175 if (pattern == null) in addPattern() 178 PatternEntry.Parser parser = new PatternEntry.Parser(pattern); in addPattern()
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKLocalizedFieldParser.java | 98 …public void test_parse_textField(String pattern, String text, int pos, int expectedPos, long expec… in test_parse_textField() argument 101 switch(pattern.charAt(0)) { in test_parse_textField() 119 = new DateTimeFormatterBuilder().appendPattern(pattern); in test_parse_textField() 149 …public void test_parse_textLocalDate(String pattern, String text, int pos, int expectedPos, LocalD… in test_parse_textLocalDate() argument 151 DateTimeFormatterBuilder b = new DateTimeFormatterBuilder().appendPattern(pattern); in test_parse_textLocalDate() 164 assertEquals(result, expectedValue, "LocalDate incorrect for " + pattern); in test_parse_textLocalDate() 186 …public void test_parse_WeekBasedYear(String pattern, String text, int pos, int expectedPos, LocalD… in test_parse_WeekBasedYear() argument 188 DateTimeFormatterBuilder b = new DateTimeFormatterBuilder().appendPattern(pattern); in test_parse_WeekBasedYear() 196 assertEquals(parsed.isSupported(weekDef.dayOfWeek()), pattern.indexOf('e') >= 0); in test_parse_WeekBasedYear() 197 … assertEquals(parsed.isSupported(weekDef.weekOfWeekBasedYear()), pattern.indexOf('w') >= 0); in test_parse_WeekBasedYear() [all …]
|
D | TCKLocalizedFieldPrinter.java | 96 public void test_localizedDayOfWeek(String pattern, String expected) { in test_localizedDayOfWeek() argument 98 = new DateTimeFormatterBuilder().appendPattern(pattern); in test_localizedDayOfWeek() 102 assertEquals(result, expected, "Wrong output for pattern '" + pattern + "'."); in test_localizedDayOfWeek() 123 public void test_print_WeekBasedYear(String pattern, String expectedText, LocalDate date) { in test_print_WeekBasedYear() argument 124 DateTimeFormatter dtf = DateTimeFormatter.ofPattern(pattern, locale); in test_print_WeekBasedYear() 127 …assertEquals(result, expectedText, "Incorrect formatting for " + pattern + ", weekDef: " + weekDef… in test_print_WeekBasedYear()
|
D | TCKOffsetPrinterParser.java | 244 String pattern = null; in test_print_pattern_X() local 246 pattern = "X"; in test_print_pattern_X() 248 pattern = "XX"; in test_print_pattern_X() 250 pattern = "XXX"; in test_print_pattern_X() 252 pattern = "XXXX"; in test_print_pattern_X() 254 pattern = "XXXXX"; in test_print_pattern_X() 256 if (pattern != null) { in test_print_pattern_X() 258 builder.appendPattern(pattern); in test_print_pattern_X() 266 String pattern = null; in test_print_pattern_x() local 269 pattern = "x"; in test_print_pattern_x() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | Scanner.java | 371 return p.pattern().equals(s); 539 private Scanner(Readable source, Pattern pattern) { in Scanner() argument 541 assert pattern != null : "pattern should not be null"; in Scanner() 543 delimPattern = pattern; in Scanner() 773 hasNextPattern = matcher.pattern(); in cacheResult() 779 hasNextPattern = matcher.pattern(); in cacheResult() 918 private String getCompleteTokenInBuffer(Pattern pattern) { in getCompleteTokenInBuffer() argument 973 if (pattern == null) { in getCompleteTokenInBuffer() 975 pattern = FIND_ANY_PATTERN; in getCompleteTokenInBuffer() 978 matcher.usePattern(pattern); in getCompleteTokenInBuffer() [all …]
|
/libcore/ojluni/src/main/java/java/util/regex/ |
D | PatternSyntaxException.java | 46 private final String pattern; field in PatternSyntaxException 64 this.pattern = regex; in PatternSyntaxException() 93 return pattern; in getPattern() 115 sb.append(pattern); in getMessage()
|
D | Pattern.java | 932 private final String pattern; field in Pattern 993 public String pattern() { in pattern() method in Pattern 994 return pattern; in pattern() 1006 return pattern; in toString() 1141 String[] fast = fastSplit(pattern, input.toString(), limit); in split() 1376 pattern = p; in Pattern() 1414 if (pattern == null) { in compile() 1418 String icuPattern = pattern; in compile() 1420 icuPattern = quote(pattern); in compile()
|
/libcore/luni/src/test/resources/bundles/java/util/logging/ |
D | res2.properties | 11 pattern=pattern {0, number}2 key 12 pattern{0,number}=NOLOCALE2
|
D | res3.properties | 11 pattern=pattern {0, number}3 key 12 pattern{0,number}=NOLOCALE3
|
D | res_en_US.properties | 11 pattern=US_pattern {0, number} key 12 pattern{0,number}=US
|
/libcore/luni/src/main/java/libcore/icu/ |
D | ICU.java | 304 String pattern = CACHED_PATTERNS.get(key); in getBestDateTimePattern() local 305 if (pattern == null) { in getBestDateTimePattern() 306 pattern = getBestDateTimePattern0(skeleton, locale); in getBestDateTimePattern() 307 CACHED_PATTERNS.put(key, pattern); in getBestDateTimePattern() 309 return pattern; in getBestDateTimePattern() 324 public static char[] getDateFormatOrder(String pattern) { in getDateFormatOrder() argument 331 for (int i = 0; i < pattern.length(); ++i) { in getDateFormatOrder() 332 char ch = pattern.charAt(i); in getDateFormatOrder() 347 throw new IllegalArgumentException("Bad pattern character '" + ch + "' in " + pattern); in getDateFormatOrder() 349 if (i < pattern.length() - 1 && pattern.charAt(i + 1) == '\'') { in getDateFormatOrder() [all …]
|
/libcore/ojluni/src/main/java/sun/net/spi/ |
D | DefaultProxySelector.java | 129 Pattern pattern; field in DefaultProxySelector.NonProxyInfo 138 NonProxyInfo(String p, String s, Pattern pattern, String d) { in NonProxyInfo() argument 141 this.pattern = pattern; in NonProxyInfo() 272 nprop.pattern = null; in select() 283 nprop.pattern = toPattern(nphosts); in select() 287 if (shouldNotUseProxyFor(nprop.pattern, urlhost)) { in select() 371 static boolean shouldNotUseProxyFor(Pattern pattern, String urlhost) { in shouldNotUseProxyFor() argument 372 if (pattern == null || urlhost.isEmpty()) in shouldNotUseProxyFor() 374 boolean matches = pattern.matcher(urlhost).matches(); in shouldNotUseProxyFor()
|
/libcore/luni/src/test/java/org/apache/harmony/regex/tests/java/util/regex/ |
D | PatternTest.java | 254 assertTrue(p.pattern().equals(aPattern)); in testPattern() 535 String pattern = "b)a"; in testCompileStringInt() local 537 Pattern.compile(pattern); in testCompileStringInt() 539 + pattern); in testCompileStringInt() 543 pattern = "bcde)a"; in testCompileStringInt() 545 Pattern.compile(pattern); in testCompileStringInt() 547 + pattern); in testCompileStringInt() 551 pattern = "bbg())a"; in testCompileStringInt() 553 Pattern pat = Pattern.compile(pattern); in testCompileStringInt() 555 + pattern); in testCompileStringInt() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | FormatterTest.java | 1175 final int pattern = 1; in test_format_LString$LObject_GeneralConversionB() local 1180 f.format((String) triple[i][pattern], triple[i][input]); in test_format_LString$LObject_GeneralConversionB() 1182 + ",pattern[" + i + "]:" + triple[i][pattern], triple[i][output], f.toString()); in test_format_LString$LObject_GeneralConversionB() 1185 f.format(((String) triple[i][pattern]).toUpperCase(Locale.US), triple[i][input]); in test_format_LString$LObject_GeneralConversionB() 1187 + ",pattern[" + i + "]:" + triple[i][pattern], ((String) triple[i][output]) in test_format_LString$LObject_GeneralConversionB() 1239 final int pattern = 1; in test_format_LString$LObject_GeneralConversionS() local 1244 f.format((String) triple[i][pattern], triple[i][input]); in test_format_LString$LObject_GeneralConversionS() 1246 + ",pattern[" + i + "]:" + triple[i][pattern], triple[i][output], f.toString()); in test_format_LString$LObject_GeneralConversionS() 1249 f.format(((String) triple[i][pattern]).toUpperCase(Locale.US), triple[i][input]); in test_format_LString$LObject_GeneralConversionS() 1251 + ",pattern[" + i + "]:" + triple[i][pattern], ((String) triple[i][output]) in test_format_LString$LObject_GeneralConversionS() [all …]
|
/libcore/ojluni/src/main/java/javax/net/ssl/ |
D | SNIHostName.java | 327 private final Pattern pattern; field in SNIHostName.SNIHostNameMatcher 343 pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE); in SNIHostNameMatcher() 387 if (pattern.matcher(asciiName).matches()) { in matches() 393 return pattern.matcher(IDN.toUnicode(asciiName)).matches(); in matches()
|
/libcore/luni/src/test/java/libcore/java/util/logging/ |
D | OldFormatterTest.java | 64 String pattern = "pattern without 0 {1, number}"; in testFormatMessage() local 65 r.setMessage(pattern); in testFormatMessage() 66 assertEquals(pattern, f.formatMessage(r)); in testFormatMessage()
|