/libcore/ojluni/src/test/java/text/Format/NumberFormat/ |
D | BigDecimalFormat.java | 107 String from, to; in test_Format_in_NumberFormat_BigDecimal() local 116 from = "0." + nonsep_zero + "123456789"; in test_Format_in_NumberFormat_BigDecimal() 117 nf.format(new BigDecimal(from), formatted, new FieldPosition(0)); in test_Format_in_NumberFormat_BigDecimal() 118 checkFormat(from, formatted, from, ((DecimalFormat)nf).getMultiplier()); in test_Format_in_NumberFormat_BigDecimal() 127 from = "-0." + nonsep_zero + "123456789"; in test_Format_in_NumberFormat_BigDecimal() 128 nf.format(new BigDecimal(from), formatted, fp); in test_Format_in_NumberFormat_BigDecimal() 129 checkFormat(from, formatted, from, ((DecimalFormat)nf).getMultiplier()); in test_Format_in_NumberFormat_BigDecimal() 130 checkFieldPosition(from, fp, 0, 1); in test_Format_in_NumberFormat_BigDecimal() 139 from = nonsep_int + "." + fra; in test_Format_in_NumberFormat_BigDecimal() 141 nf.format(new BigDecimal(from), formatted, fp); in test_Format_in_NumberFormat_BigDecimal() [all …]
|
D | BigDecimalParse.java | 428 static final String[] from = { field in BigDecimalParse 491 parsed = mf.parse(from[i], pp); in test_Parse_in_MessageFormat_NotParseIntegerOnly() 496 pp.getErrorIndex() + " for " + from[i]); in test_Parse_in_MessageFormat_NotParseIntegerOnly() 502 " for " + from[i]); in test_Parse_in_MessageFormat_NotParseIntegerOnly() 509 checkType(from[i], getType(new BigDecimal(expected1[i])), in test_Parse_in_MessageFormat_NotParseIntegerOnly() 511 checkParse(from[i], new BigDecimal(expected1[i]), in test_Parse_in_MessageFormat_NotParseIntegerOnly() 578 parsed = mf.parse(from[i], pp); in test_Parse_in_MessageFormat_ParseIntegerOnly() 584 " for " + from[i]); in test_Parse_in_MessageFormat_ParseIntegerOnly() 590 " for " + from[i]); in test_Parse_in_MessageFormat_ParseIntegerOnly() 598 checkType(from[i], getType(new BigDecimal(expected2[i])), in test_Parse_in_MessageFormat_ParseIntegerOnly() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestDateTimeFormatter.java | 117 assertGoodErrorDate(DayOfWeek::from, "DayOfWeek"); in test_parse_errorMessage() 118 assertGoodErrorDate(Month::from, "Month"); in test_parse_errorMessage() 119 assertGoodErrorDate(YearMonth::from, "YearMonth"); in test_parse_errorMessage() 120 assertGoodErrorDate(MonthDay::from, "MonthDay"); in test_parse_errorMessage() 121 assertGoodErrorDate(LocalDate::from, "LocalDate"); in test_parse_errorMessage() 122 assertGoodErrorDate(LocalTime::from, "LocalTime"); in test_parse_errorMessage() 123 assertGoodErrorDate(LocalDateTime::from, "LocalDateTime"); in test_parse_errorMessage() 124 assertGoodErrorDate(OffsetTime::from, "OffsetTime"); in test_parse_errorMessage() 125 assertGoodErrorDate(OffsetDateTime::from, "OffsetDateTime"); in test_parse_errorMessage() 126 assertGoodErrorDate(ZonedDateTime::from, "ZonedDateTime"); in test_parse_errorMessage() [all …]
|
/libcore/ojluni/src/test/java/lang/invoke/ |
D | ExplicitCastArgumentsTest.java | 127 for (Wrapper from : Wrapper.values()) { in testNullRef2Prim() 129 if (from == Wrapper.VOID || to == Wrapper.VOID) { in testNullRef2Prim() 136 testConversion(mode, from.wrapperType(), in testNullRef2Prim() 150 for (Wrapper from : Wrapper.values()) { in testRef2Prim() 152 if (from == Wrapper.VOID || to == Wrapper.VOID in testRef2Prim() 156 Object value = RANDOM_VALUES.get(from); in testRef2Prim() 158 if (from != Wrapper.OBJECT) { in testRef2Prim() 160 testConversion(mode, from.wrapperType(), in testRef2Prim() 163 testConversion(mode, from.wrapperType(), in testRef2Prim() 179 for (Wrapper from : Wrapper.values()) { in testPrim2Ref() [all …]
|
/libcore/ojluni/src/test/java/nio/file/attribute/ |
D | FileTimeTest.java | 127 FileTime ft = FileTime.from(value, unit); in main() 136 FileTime ft = FileTime.from(value, unit); in main() 144 ft = FileTime.from(value, unit); in main() 159 FileTime ft = FileTime.from(instant); in main() 165 ft = FileTime.from(instant); in main() 171 ft = FileTime.from(nanos, NANOSECONDS); in main() 175 if (!ft.equals(FileTime.from(instant))) { in main() 215 FileTime.from(0L, null); in main() 219 FileTime.from(null); in main() 233 FileTime.from(Instant.MAX).toMillis()); in main() [all …]
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | Streams.java | 58 private int from; field in Streams.RangeIntSpliterator 65 RangeIntSpliterator(int from, int upTo, boolean closed) { in RangeIntSpliterator() argument 66 this(from, upTo, closed ? 1 : 0); in RangeIntSpliterator() 69 private RangeIntSpliterator(int from, int upTo, int last) { in RangeIntSpliterator() argument 70 this.from = from; in RangeIntSpliterator() 79 final int i = from; in tryAdvance() 81 from++; in tryAdvance() 98 int i = from; in forEachRemaining() 101 from = upTo; in forEachRemaining() 115 return ((long) upTo) - from + last; in estimateSize() [all …]
|
D | Node.java | 122 default Node<T> truncate(long from, long to, IntFunction<T[]> generator) { in truncate() argument 123 if (from == 0 && to == count()) in truncate() 126 long size = to - from; in truncate() 129 for (int i = 0; i < from && spliterator.tryAdvance(e -> { }); i++) { } in truncate() 258 T_NODE truncate(long from, long to, IntFunction<T[]> generator); in truncate() argument 361 default Node.OfInt truncate(long from, long to, IntFunction<Integer[]> generator) { in truncate() argument 362 if (from == 0 && to == count()) in truncate() 364 long size = to - from; in truncate() 368 for (int i = 0; i < from && spliterator.tryAdvance((IntConsumer) e -> { }); i++) { } in truncate() 438 default Node.OfLong truncate(long from, long to, IntFunction<Long[]> generator) { in truncate() argument [all …]
|
/libcore/ojluni/src/test/java/util/zip/ |
D | TestExtraTime.java | 64 test0(FileTime.from(10, TimeUnit.MILLISECONDS), null, null, null, extra); in main() 66 test0(FileTime.from(-100, TimeUnit.DAYS), null, null, null, extra); in main() 70 test(FileTime.from(time, TimeUnit.MILLISECONDS), in main() 71 FileTime.from(time + 300000, TimeUnit.MILLISECONDS), in main() 72 FileTime.from(time - 300000, TimeUnit.MILLISECONDS), in main() 77 test(FileTime.from(time, TimeUnit.MILLISECONDS), in main() 78 FileTime.from(time + 300000, TimeUnit.MILLISECONDS), in main() 79 FileTime.from(time - 300000, TimeUnit.MILLISECONDS), in main() 84 test(FileTime.from(time, TimeUnit.SECONDS), in main() 85 FileTime.from(time, TimeUnit.SECONDS), in main() [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | ScannerBenchmark.java | 37 private final int from; field in ScannerBenchmark.LineLength 40 LineLength(int from, int to) { in LineLength() argument 41 this.from = from; in LineLength() 46 return RANDOM.nextInt(to - from) + from; in get()
|
/libcore/ojluni/src/main/java/java/util/ |
D | ReverseOrderSortedSetView.java | 196 public SortedSet<E> subSet(E from, E to) { in subSet() argument 197 return new Subset(from, to); in subSet() 200 public SortedSet<E> tailSet(E from) { in tailSet() argument 201 return new Subset(from, null); in tailSet() 348 public SortedSet<E> subSet(E from, E to) { in subSet() argument 349 if (aboveHead(from) && belowTail(from) && in subSet() 351 cmp.compare(from, to) <= 0) { in subSet() 352 return ReverseOrderSortedSetView.this.new Subset(from, to); in subSet() 365 public SortedSet<E> tailSet(E from) { in tailSet() argument 366 if (aboveHead(from) && belowTail(from)) in tailSet()
|
D | JumboEnumSet.java | 55 void addRange(E from, E to) { in addRange() argument 56 int fromIndex = from.ordinal() >>> 6; in addRange() 60 elements[fromIndex] = (-1L >>> (from.ordinal() - to.ordinal() - 1)) in addRange() 61 << from.ordinal(); in addRange() 63 elements[fromIndex] = (-1L << from.ordinal()); in addRange() 68 size = to.ordinal() - from.ordinal() + 1; in addRange()
|
D | ReverseOrderSortedMapView.java | 449 public SortedMap<K, V> subMap(K from, K to) { 450 if (aboveHead(from) && belowTail(from) && 452 cmp.compare(from, to) <= 0) { 453 return new Submap(from, to); 466 public SortedMap<K, V> tailMap(K from) { 467 if (aboveHead(from) && belowTail(from)) 468 return new Submap(from, tail);
|
D | EnumSet.java | 361 public static <E extends Enum<E>> EnumSet<E> range(E from, E to) { in range() argument 362 if (from.compareTo(to) > 0) in range() 363 throw new IllegalArgumentException(from + " > " + to); in range() 364 EnumSet<E> result = noneOf(from.getDeclaringClass()); in range() 365 result.addRange(from, to); in range() 373 abstract void addRange(E from, E to); in addRange() argument
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | DateTest.java | 108 assertEquals(new Date(millis), Date.from(Instant.ofEpochMilli(millis))); in check_convertFromAndToInstant_milliseconds() 129 Date.from(Instant.ofEpochSecond(minSecond)); in test_convertFromInstant_secondsAndNanos() 132 Date.from(Instant.ofEpochSecond(minSecond - 1, 192000000)); in test_convertFromInstant_secondsAndNanos() 138 Date.from(Instant.ofEpochSecond(maxSecond, 0)); in test_convertFromInstant_secondsAndNanos() 141 Date.from(Instant.ofEpochSecond(maxSecond, 807999999)); in test_convertFromInstant_secondsAndNanos() 148 Date.from(instant); in assertArithmeticOverflowDateFrom() 177 assertEquals(date, Date.from(instant)); in check_convertToInstantAndBack()
|
/libcore/ojluni/src/main/java/java/lang/invoke/ |
D | Transformers.java | 140 this.range2 = EmulatedStackFrame.Range.from(type, startPos + numDropped); in DropArguments() 756 private static void throwWrongMethodTypeException(MethodType from, MethodType to) { in throwWrongMethodTypeException() argument 757 throw new WrongMethodTypeException("Cannot convert " + from + " to " + to); in throwWrongMethodTypeException() 1180 copyRange = EmulatedStackFrame.Range.from(type(), 1); in Invoker() 1281 trailingRange = EmulatedStackFrame.Range.from(spreaderType, arrayOffset + 1); in Spreader() 1442 trailingRange = EmulatedStackFrame.Range.from(type(), arrayOffset + arrayLength); in Collector() 1679 this.range2 = Range.from(type(), pos + numFilterArgs); in CollectArguments() 1755 this.trailingArgs = Range.from(type(), position); in FoldArguments() 1955 private static void throwClassCastException(Class from, Class to) in throwClassCastException() argument 1957 throw new ClassCastException("Cannot cast from " + from + " to " + to); in throwClassCastException() [all …]
|
/libcore/ojluni/src/test/java/util/Arrays/ |
D | Correct.java | 82 static void stupidSort(Integer[] a1, int from, int to) { in stupidSort() argument 83 if (from > to - 1 ) in stupidSort() 86 for (int x=from; x<to; x++) { in stupidSort() 101 static void stupidSort(Integer[] a1, int from, int to, Comparator<Integer> comparator) { in stupidSort() argument 102 if (from > to - 1 ) in stupidSort() 105 for (int x=from; x<to; x++) { in stupidSort()
|
/libcore/tools/upstream/src/main/java/libcore/ |
D | CopyUpstreamFiles.java | 64 private void copyFile(Path from, Path to) throws IOException { in copyFile() argument 65 if (!from.toFile().canRead()) { in copyFile() 66 throw new IOException("Error reading " + from); in copyFile() 75 Files.copy(from, to); in copyFile()
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKDateTimeFormatter.java | 180 base.parse("2012-6-30-321", LocalDate::from); // wrong day-of-year in test_resolverFields_selectOneDateResolveYMD() 185 LocalDate parsed = f.parse("2012-6-30-321", LocalDate::from); // ignored day-of-year in test_resolverFields_selectOneDateResolveYMD() 199 base.parse("2012-6-30-321", LocalDate::from); // wrong month/day-of-month in test_resolverFields_selectOneDateResolveYD() 204 LocalDate parsed = f.parse("2012-6-30-321", LocalDate::from); // ignored month/day-of-month in test_resolverFields_selectOneDateResolveYD() 215 base.parse("2012-321-1", LocalDate::from); // wrong day-of-week in test_resolverFields_ignoreCrossCheck() 220 LocalDate parsed = f.parse("2012-321-1", LocalDate::from); // ignored wrong day-of-week in test_resolverFields_ignoreCrossCheck() 472 assertEquals(result.query(LocalDate::from), LocalDate.of(2012, 6, 30)); in test_parse_CharSequence_resolved() 510 assertEquals(result.query(LocalDate::from), LocalDate.of(2012, 6, 30)); in test_parse_CharSequence_ParsePosition_resolved() 549 LocalDate result = DATE_FORMATTER.parse("ONE2012 07 27", LocalDate::from); in test_parse_Query_String() 555 … LocalDate result = DATE_FORMATTER.parse(new StringBuilder("ONE2012 07 27"), LocalDate::from); in test_parse_Query_CharSequence() [all …]
|
D | TCKInstantPrinterParser.java | 243 assertEquals(f.parse(input, Instant::from), expected); in test_parse_digitsMinusOne() 271 assertEquals(f.parse(input, Instant::from), expected); in test_parse_digitsNine() 287 f.parse(input, Instant::from); in test_invalid_Instant() 296 assertEquals(parsed.query(Instant::from), expected); in test_parse_endOfDay() 308 assertEquals(parsed.query(Instant::from), expected); in test_parse_leapSecond()
|
/libcore/luni/src/test/java/libcore/java/time/chrono/ |
D | ThaiBuddhistChronologyTest.java | 86 ThaiBuddhistDate.from(LocalDate.of(2000, 2, 1)), //February of a leap year in test_ThaiBuddhistDate_range() 87 ThaiBuddhistDate.from(LocalDate.of(2001, 2, 1)), //February of a non-leap year in test_ThaiBuddhistDate_range() 95 assertEquals(LocalDate.from(date).range(ChronoField.DAY_OF_MONTH), in test_ThaiBuddhistDate_range() 97 assertEquals(LocalDate.from(date).range(ChronoField.DAY_OF_YEAR), in test_ThaiBuddhistDate_range() 99 assertEquals(LocalDate.from(date).range(ChronoField.ALIGNED_WEEK_OF_MONTH), in test_ThaiBuddhistDate_range()
|
D | MinguoChronologyTest.java | 86 MinguoDate.from(LocalDate.of(2000, 2, 1)), //February of a leap year in test_MinguoDate_range() 87 MinguoDate.from(LocalDate.of(2001, 2, 1)), //February of a non-leap year in test_MinguoDate_range() 95 assertEquals(LocalDate.from(date).range(ChronoField.DAY_OF_MONTH), in test_MinguoDate_range() 97 assertEquals(LocalDate.from(date).range(ChronoField.DAY_OF_YEAR), in test_MinguoDate_range() 99 assertEquals(LocalDate.from(date).range(ChronoField.ALIGNED_WEEK_OF_MONTH), in test_MinguoDate_range()
|
/libcore/ojluni/src/test/java/util/Collections/ |
D | AddAll.java | 73 private static Integer[] range(int from, int to) { in range() argument 74 Integer[] result = new Integer[to - from]; in range() 75 for (int i = from, j=0; i < to; i++, j++) in range()
|
/libcore/tools/expected_upstream/ |
D | README.md | 1 If you want to import files from the OpenJDK into `libcore/`, you are reading 12 The general idea is to get a change from OpenJDK into libcore in AOSP by 13 `git merge` from an OpenJDK branch. However, each file in `ojluni/` can come 14 from a different OpenJDK version. `expected_upstream` is a staging branch 16 we update an `ojluni/` file from a new upstream version, and the command should 47 `ojluni_merge_to_main` will `git-merge` from the upstream branch. 68 ## 2a. Add a java test from the upstream 109 1. Add or upgrade a file from the upstream OpenJDK 111 import the file from the upstream. Later, you can merge the file and 113 2. Remove an `ojluni/` file that originally came from the OpenJDK [all …]
|
/libcore/ojluni/src/main/java/sun/reflect/misc/ |
D | ReflectUtil.java | 191 public static boolean needsPackageAccessCheck(ClassLoader from, ClassLoader to) { in needsPackageAccessCheck() argument 192 if (from == null || from == to) in needsPackageAccessCheck() 198 return !isAncestor(from, to); in needsPackageAccessCheck()
|
/libcore/dom/src/test/java/ |
D | README | 1 all classes under org.w3c.domts are from the official w3c test suite. 2 Level 1 Core tests and Level 2 Core tests from
|