/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | IntegerTest.java | 41 assertEquals("Returned incorrect byte value", -1, new Integer(65535) in test_byteValue() 43 assertEquals("Returned incorrect byte value", 127, new Integer(127) in test_byteValue() 52 assertTrue("-2 compared to 1 gave non-negative answer", new Integer(-2) in test_compareToLjava_lang_Integer() 53 .compareTo(new Integer(1)) < 0); in test_compareToLjava_lang_Integer() 54 assertEquals("-2 compared to -2 gave non-zero answer", 0, new Integer(-2) in test_compareToLjava_lang_Integer() 55 .compareTo(new Integer(-2))); in test_compareToLjava_lang_Integer() 56 assertTrue("3 compared to 2 gave non-positive answer", new Integer(3) in test_compareToLjava_lang_Integer() 57 .compareTo(new Integer(2)) > 0); in test_compareToLjava_lang_Integer() 60 new Integer(0).compareTo(null); in test_compareToLjava_lang_Integer() 73 132233, Integer.decode("132233").intValue()); in test_decodeLjava_lang_String2() [all …]
|
D | NumberTest.java | 28 ((byte) new Integer(number).intValue()) == new Integer(number) in test_byteValue() 32 ((byte) new Integer(number).intValue()) == new Integer(number) in test_byteValue() 36 ((byte) new Integer(number).intValue()) == new Integer(number) in test_byteValue() 40 ((byte) new Integer(number).intValue()) == new Integer(number) in test_byteValue() 50 ((short) new Integer(number).intValue()) == new Integer(number) in test_shortValue() 54 ((short) new Integer(number).intValue()) == new Integer(number) in test_shortValue() 58 ((short) new Integer(number).intValue()) == new Integer(number) in test_shortValue() 62 ((short) new Integer(number).intValue()) == new Integer(number) in test_shortValue()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | IntegerTest.java | 30 Integer.getInteger("testIncInt")); in testSystemProperties() 31 assertEquals(new Integer(4), Integer.getInteger("testIncInt", 4)); in testSystemProperties() 32 assertEquals(new Integer(4), in testSystemProperties() 33 Integer.getInteger("testIncInt", new Integer(4))); in testSystemProperties() 40 final int min = Integer.MIN_VALUE; in testCompare() 42 final int max = Integer.MAX_VALUE; in testCompare() 43 assertTrue(Integer.compare(max, max) == 0); in testCompare() 44 assertTrue(Integer.compare(min, min) == 0); in testCompare() 45 assertTrue(Integer.compare(zero, zero) == 0); in testCompare() 46 assertTrue(Integer.compare(max, zero) > 0); in testCompare() [all …]
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | RecursiveTaskTest.java | 112 void checkCompletesNormally(RecursiveTask<Integer> a, int expected) { in checkCompletesNormally() 113 Integer r = a.join(); in checkCompletesNormally() 122 void checkCompletedNormally(RecursiveTask<Integer> a, int expected) { in checkCompletedNormally() 123 Integer r = a.getRawResult(); in checkCompletedNormally() 192 static final Integer NoResult = Integer.valueOf(-17); 195 final class FibTask extends CheckedRecursiveTask<Integer> { 198 public Integer realCompute() { in realCompute() 207 public void publicSetRawResult(Integer result) { in publicSetRawResult() 213 final class FailingFibTask extends RecursiveTask<Integer> { 217 public Integer compute() { in compute() [all …]
|
D | Atomic8Test.java | 42 static Integer addInteger17(Integer x) { in addInteger17() 43 return new Integer(x.intValue() + 17); in addInteger17() 45 static Integer sumInteger(Integer x, Integer y) { in sumInteger() 46 return new Integer(x.intValue() + y.intValue()); in sumInteger() 51 volatile Integer anIntegerField; 63 AtomicReferenceFieldUpdater<Atomic8Test,Integer> anIntegerFieldUpdater() { in anIntegerFieldUpdater() 65 (Atomic8Test.class, Integer.class, "anIntegerField"); in anIntegerFieldUpdater() 139 assertEquals(1, a.getAndAccumulate(2, Integer::sum)); in testIntGetAndAccumulate() 140 assertEquals(3, a.getAndAccumulate(3, Integer::sum)); in testIntGetAndAccumulate() 150 assertEquals(7, a.accumulateAndGet(6, Integer::sum)); in testIntAccumulateAndGet() [all …]
|
D | CompletableFutureTest.java | 213 CompletableFuture<Integer> f = new CompletableFuture<>(); 222 for (Integer v1 : new Integer[] { 1, null }) 224 CompletableFuture<Integer> f = new CompletableFuture<>(); 236 CompletableFuture<Integer> f = new CompletableFuture<>(); 250 CompletableFuture<Integer> f = new CompletableFuture<>(); 262 CompletableFuture<Integer> f = new CompletableFuture<>(); 285 for (Integer v1 : new Integer[] { 1, null }) 288 CompletableFuture<Integer> f; 320 for (Integer v1 : new Integer[] { 1, null }) 322 CompletableFuture<Integer> f = new CompletableFuture<>(); [all …]
|
D | AbstractQueueTest.java | 30 static class Succeed extends AbstractQueue<Integer> { 31 public boolean offer(Integer x) { in offer() 35 public Integer peek() { return one; } in peek() 36 public Integer poll() { return one; } in poll() 41 static class Fail extends AbstractQueue<Integer> { 42 public boolean offer(Integer x) { in offer() 46 public Integer peek() { return null; } in peek() 47 public Integer poll() { return null; } in poll() 147 Integer[] ints = new Integer[SIZE]; in testAddAll2() 160 Integer[] ints = new Integer[SIZE]; in testAddAll3() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | OldAndroidArrayListTest.java | 34 array.add(new Integer(0)); in testArrayList() 35 array.add(0, new Integer(1)); in testArrayList() 36 array.add(1, new Integer(2)); in testArrayList() 37 array.add(new Integer(3)); in testArrayList() 38 array.add(new Integer(1)); in testArrayList() 43 assertEquals(1, ((Integer) array.get(0)).intValue()); in testArrayList() 44 assertEquals(2, ((Integer) array.get(1)).intValue()); in testArrayList() 45 assertEquals(0, ((Integer) array.get(2)).intValue()); in testArrayList() 46 assertEquals(3, ((Integer) array.get(3)).intValue()); in testArrayList() 47 assertEquals(1, ((Integer) array.get(4)).intValue()); in testArrayList() [all …]
|
D | TimSortTest.java | 29 private static final Comparator<Integer> NATURAL_ORDER_COMPARATOR = new Comparator<Integer>() { 30 public int compare(Integer first, Integer second) { 47 Integer[] array = createBugTriggerData(); in testBug19493779WithComparable() 54 Integer[] array = createBugTriggerData(); in testBug19493779WithComparator() 60 private static void assertSorted(Integer[] arrayToSort) { in assertSorted() 68 private static Integer[] createBugTriggerData() { in createBugTriggerData() 69 final Integer zero = 0; in createBugTriggerData() 70 final Integer one = 1; in createBugTriggerData() 72 Integer[] bugTriggerData = new Integer[BAD_DATA_SIZE]; in createBugTriggerData()
|
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/ |
D | NodeTest.java | 43 Integer[] array = new Integer[size]; in createSizes() 48 List<Node<Integer>> nodes = new ArrayList<>(); in createSizes() 52 … nodes.add(tree(Arrays.asList(array), l -> Nodes.node(l.toArray(new Integer[l.size()])))); in createSizes() 66 Node<Integer> fill(Integer[] array, Node.Builder<Integer> nb) { in fill() 68 for (Integer i : array) { in fill() 75 Node<Integer> degenerateTree(Iterator<Integer> it) { in degenerateTree() 80 Integer i = it.next(); in degenerateTree() 82 return new Nodes.ConcNode<Integer>(Nodes.node(new Integer[] {i}), degenerateTree(it)); in degenerateTree() 85 return Nodes.node(new Integer[]{i}); in degenerateTree() 89 Node<Integer> tree(List<Integer> l, Function<List<Integer>, Node<Integer>> m) { in tree() argument [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | PriorityQueueTest.java | 45 PriorityQueue<Integer> integerQueue = new PriorityQueue<Integer>(); in test_iterator() 46 Integer[] array = { 2, 45, 7, -12, 9 }; in test_iterator() 50 Iterator<Integer> iter = integerQueue.iterator(); in test_iterator() 52 ArrayList<Integer> iterResult = new ArrayList<Integer>(); in test_iterator() 66 PriorityQueue<Integer> integerQueue = new PriorityQueue<Integer>(); in test_iterator_empty() 67 Iterator<Integer> iter = integerQueue.iterator(); in test_iterator_empty() 88 PriorityQueue<Integer> integerQueue = new PriorityQueue<Integer>(); in test_iterator_outofbound() 90 Iterator<Integer> iter = integerQueue.iterator(); in test_iterator_outofbound() 114 PriorityQueue<Integer> integerQueue = new PriorityQueue<Integer>(); in test_iterator_remove() 115 Integer[] array = { 2, 45, 7, -12, 9 }; in test_iterator_remove() [all …]
|
D | LinkedHashSetTest.java | 122 hs.add(new Integer(8)); in test_addLjava_lang_Object() 124 hs.add(new Integer(-9)); in test_addLjava_lang_Object() 127 assertTrue("Failed to add element to set", hs.contains(new Integer(-9))); in test_addLjava_lang_Object() 189 Integer ii = (Integer) oo; in test_iterator() 210 hs.remove(new Integer(98)); in test_removeLjava_lang_Object() 211 assertTrue("Failed to remove element", !hs.contains(new Integer(98))); in test_removeLjava_lang_Object() 237 LinkedHashSet<Integer> lhs = new LinkedHashSet<Integer>(); in test_retainAllLjava_util_Collection() 240 lhs.add(new Integer(1)); in test_retainAllLjava_util_Collection() 244 v = new Vector<Integer>(); in test_retainAllLjava_util_Collection() 245 v.add(new Integer(1)); in test_retainAllLjava_util_Collection() [all …]
|
/libcore/support/src/test/java/tests/support/ |
D | Support_ListTest.java | 27 List<Integer> list; // must contain the Integers 0 to 99 in order 33 public Support_ListTest(String p1, List<Integer> l) { in Support_ListTest() 46 .equals(new Integer(counter))); in runTest() 50 list.add(50, new Integer(1000)); in runTest() 52 .get(50).equals(new Integer(1000))); in runTest() 55 list.get(51).equals(new Integer(50))); in runTest() 58 list.get(49).equals(new Integer(49))); in runTest() 60 list.set(50, new Integer(2000)); in runTest() 62 .equals(new Integer(2000))); in runTest() 64 list.get(51).equals(new Integer(50))); in runTest() [all …]
|
D | Support_CollectionTest.java | 27 Collection<Integer> col; // must contain the Integers 0 to 99 33 public Support_CollectionTest(String p1, Collection<Integer> c) { in Support_CollectionTest() 43 Collection<Integer> myCollection = new TreeSet<Integer>(); in runTest() 44 myCollection.add(new Integer(101)); in runTest() 45 myCollection.add(new Integer(102)); in runTest() 46 myCollection.add(new Integer(103)); in runTest() 49 assertTrue("CollectionTest - a) add did not work", col.add(new Integer( in runTest() 52 .contains(new Integer(101))); in runTest() 56 .remove(new Integer(101))); in runTest() 58 .contains(new Integer(101))); in runTest() [all …]
|
D | Support_UnmodifiableCollectionTest.java | 29 Collection<Integer> col; 38 public Support_UnmodifiableCollectionTest(String p1, Collection<Integer> c) { in Support_UnmodifiableCollectionTest() 48 .contains(new Integer(0))); in runTest() 50 .contains(new Integer(50))); in runTest() 52 .contains(new Integer(100))); in runTest() 55 HashSet<Integer> hs = new HashSet<Integer>(); in runTest() 56 hs.add(new Integer(0)); in runTest() 57 hs.add(new Integer(25)); in runTest() 58 hs.add(new Integer(99)); in runTest() 62 hs.add(new Integer(100)); in runTest() [all …]
|
/libcore/ojluni/src/main/java/java/net/ |
D | StandardSocketOptions.java | 115 public static final SocketOption<Integer> SO_SNDBUF = 116 new StdSocketOption<Integer>("SO_SNDBUF", Integer.class); 155 public static final SocketOption<Integer> SO_RCVBUF = 156 new StdSocketOption<Integer>("SO_RCVBUF", Integer.class); 218 public static final SocketOption<Integer> SO_LINGER = 219 new StdSocketOption<Integer>("SO_LINGER", Integer.class); 250 public static final SocketOption<Integer> IP_TOS = 251 new StdSocketOption<Integer>("IP_TOS", Integer.class); 300 public static final SocketOption<Integer> IP_MULTICAST_TTL = 301 new StdSocketOption<Integer>("IP_MULTICAST_TTL", Integer.class);
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | SequentialOpTest.java | 53 public void testLazy(String name, TestData.OfRef<Integer> data) { in testLazy() 54 Function<Integer, Integer> id = LambdaTestHelpers.identity(); in testLazy() 56 …Supplier<Stream<Integer>>[] suppliers = new Supplier[] { () -> data.stream(), () -> data.parallelS… in testLazy() 57 UnaryOperator<Stream<Integer>>[] configs in testLazy() 59 … (UnaryOperator<Stream<Integer>>) s -> s.peek(e -> { counter.incrementAndGet(); }), in testLazy() 60 …(UnaryOperator<Stream<Integer>>) s -> s.map(id).peek(e -> { counter.incrementAndGet(); }).sequenti… in testLazy() 61 …(UnaryOperator<Stream<Integer>>) s -> s.map(id).peek(e -> { counter.incrementAndGet(); }).parallel… in testLazy() 62 (UnaryOperator<Stream<Integer>>) s -> s.sequential().map(id).peek(e -> { in testLazy() 65 …(UnaryOperator<Stream<Integer>>) s -> s.parallel().map(id).peek(e -> { counter.incrementAndGet(); … in testLazy() 70 Supplier<Stream<Integer>> supp = suppliers[i]; in testLazy() [all …]
|
D | ConcatTest.java | 52 List<Integer> part1 = Arrays.asList(5, 3, 4, 1, 2, 6, 2, 4); 53 List<Integer> part2 = Arrays.asList(8, 8, 6, 6, 9, 7, 10, 9); 54 List<Integer> p1p2 = Arrays.asList(5, 3, 4, 1, 2, 6, 2, 4, 8, 8, 6, 6, 9, 7, 10, 9); 55 List<Integer> p2p1 = Arrays.asList(8, 8, 6, 6, 9, 7, 10, 9, 5, 3, 4, 1, 2, 6, 2, 4); 56 List<Integer> empty = new LinkedList<>(); // To be ordered 58 LinkedHashSet<Integer> distinctP1 = new LinkedHashSet<>(part1); 59 LinkedHashSet<Integer> distinctP2 = new LinkedHashSet<>(part2); 60 TreeSet<Integer> sortedP1 = new TreeSet<>(part1); 61 TreeSet<Integer> sortedP2 = new TreeSet<>(part2); 85 …Object[] createTests(String scenario, Collection<Integer> c1, Collection<Integer> c2, Collection<I… in createTests() [all …]
|
D | CollectionAndMapModifyStreamTest.java | 58 List<Integer> content = LambdaTestHelpers.countTo(10); in createCollections() 60 List<Collection<Integer>> collections = new ArrayList<>(); in createCollections() 69 Stack<Integer> stack = new Stack<>(); in createCollections() 79 ArrayBlockingQueue<Integer> arrayBlockingQueue = new ArrayBlockingQueue<>(content.size()); in createCollections() 80 for (Integer i : content) in createCollections() 99 public void testCollectionSizeRemove(String name, Collection<Integer> c) { in testCollectionSizeRemove() 101 Stream<Integer> s = c.stream(); in testCollectionSizeRemove() 109 Map<Integer, Integer> content = new HashMap<>(); in createMaps() 114 Map<String, Supplier<Map<Integer, Integer>>> maps = new HashMap<>(); in createMaps() 136 for (Map.Entry<String, Supplier<Map<Integer, Integer>>> e : maps.entrySet()) { in createMaps() [all …]
|
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/ |
D | StreamTestDataProvider.java | 38 private static final Integer[] to0 = new Integer[0]; 39 private static final Integer[] to1 = new Integer[1]; 40 private static final Integer[] to10 = new Integer[10]; 41 private static final Integer[] to100 = new Integer[100]; 42 private static final Integer[] to1000 = new Integer[1000]; 43 private static final Integer[] reversed = new Integer[100]; 44 private static final Integer[] ones = new Integer[100]; 45 private static final Integer[] twice = new Integer[200]; 46 private static final Integer[] pseudoRandom; 53 Integer[][] arrays = {to0, to1, to10, to100, to1000}; [all …]
|
/libcore/luni/src/test/java/libcore/java/util/function/ |
D | BiFunctionTest.java | 27 BiFunction<Integer, Integer, Integer> add = (x, y) -> x + y; in testAndThen() 28 Function<Integer, String> toString = i -> Integer.toString(i); in testAndThen() 33 BiFunction<Integer, Integer, Integer> add = (x, y) -> x + y; in testAndThen_nullFunction() 41 BiFunction<Integer, Integer, Integer> toNull = (x, y) -> null; in testAndThen_nullResult() 42 Function<Integer, String> assertNull = i -> { assertNull(i); return "ok"; }; in testAndThen_nullResult()
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | IntPipeline.java | 56 extends AbstractPipeline<E_IN, Integer, IntStream> 67 IntPipeline(Supplier<? extends Spliterator<Integer>> source, in IntPipeline() 80 IntPipeline(Spliterator<Integer> source, in IntPipeline() 100 private static IntConsumer adapt(Sink<Integer> sink) { in adapt() 119 private static Spliterator.OfInt adapt(Spliterator<Integer> s) { in adapt() 142 public final <P_IN> Node<Integer> evaluateToNode(PipelineHelper<Integer> helper, in evaluateToNode() 145 IntFunction<Integer[]> generator) { in evaluateToNode() 151 public final <P_IN> Spliterator<Integer> wrap(PipelineHelper<Integer> ph, in wrap() 160 …public final Spliterator.OfInt lazySpliterator(Supplier<? extends Spliterator<Integer>> supplier) { in lazySpliterator() 166 public final void forEachWithCancel(Spliterator<Integer> spliterator, Sink<Integer> sink) { in forEachWithCancel() [all …]
|
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
D | StreamTestDataProvider.java | 41 private static final Integer[] to0 = new Integer[0]; 42 private static final Integer[] to1 = new Integer[1]; 43 private static final Integer[] to10 = new Integer[10]; 44 private static final Integer[] to100 = new Integer[100]; 47 private static final Integer[] reversed = new Integer[100]; 48 private static final Integer[] ones = new Integer[100]; 49 private static final Integer[] twice = new Integer[200]; 50 private static final Integer[] pseudoRandom; 58 Integer[][] arrays = {to0, to1, to10, to100}; 59 for (Integer[] arr : arrays) { [all …]
|
/libcore/ojluni/src/main/java/java/awt/font/ |
D | TextAttribute.java | 428 public static final Integer SUPERSCRIPT_SUPER = 429 Integer.valueOf(1); 435 public static final Integer SUPERSCRIPT_SUB = 436 Integer.valueOf(-1); 577 public static final Integer UNDERLINE_ON = 578 Integer.valueOf(0); 750 public static final Integer UNDERLINE_LOW_ONE_PIXEL = 751 Integer.valueOf(1); 758 public static final Integer UNDERLINE_LOW_TWO_PIXEL = 759 Integer.valueOf(2); [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | IntegralToStringBenchmark.java | 27 Integer.toString(SMALL); in time_IntegerToString_small() 33 Integer.toString(MEDIUM); in time_IntegerToString_medium() 39 Integer.toString(LARGE); in time_IntegerToString_large() 45 Integer.toString(SMALL, 2); in time_IntegerToString2_small() 51 Integer.toString(MEDIUM, 2); in time_IntegerToString2_medium() 57 Integer.toString(LARGE, 2); in time_IntegerToString2_large() 63 Integer.toString(SMALL, 10); in time_IntegerToString10_small() 69 Integer.toString(MEDIUM, 10); in time_IntegerToString10_medium() 75 Integer.toString(LARGE, 10); in time_IntegerToString10_large() 81 Integer.toString(SMALL, 16); in time_IntegerToString16_small() [all …]
|