/libcore/luni/src/test/java/libcore/dalvik/system/ |
D | BlockGuardTest.java | 38 private RecordingPolicy recorder = new RecordingPolicy(); field in BlockGuardTest 42 recorder.setChecks(EnumSet.allOf(RecordingPolicy.Check.class)); in setUp() 44 BlockGuard.setThreadPolicy(recorder); in setUp() 50 recorder.clear(); in tearDown() 55 recorder.expectAndClear("onReadFromDisk", "onWriteToDisk"); in testFile() 63 recorder.expectNoViolations(); in testFile() 66 recorder.expectAndClear("onWriteToDisk"); in testFile() 69 recorder.expectAndClear("onReadFromDisk"); in testFile() 72 recorder.expectAndClear("onReadFromDisk"); in testFile() 75 recorder.expectAndClear("onReadFromDisk"); in testFile() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | SpliteratorsTest.java | 226 PrimitiveIntArrayList recorder = new PrimitiveIntArrayList(16); in test_spliterator_int() local 228 recorder.add(1); in test_spliterator_int() 229 recorder.add(2); in test_spliterator_int() 233 assertTrue(split1.tryAdvance((int value) -> recorder.add(value))); in test_spliterator_int() 234 assertTrue(split1.tryAdvance((Integer value) -> recorder.add(value))); in test_spliterator_int() 239 split2.forEachRemaining((int value) -> recorder.add(value)); in test_spliterator_int() 245 split1.forEachRemaining((int value) -> recorder.add(value)); in test_spliterator_int() 246 intSp.forEachRemaining((int value) -> recorder.add(value)); in test_spliterator_int() 248 int[] recorded = recorder.toSortedArray(); in test_spliterator_int() 256 PrimitiveIntArrayList recorder = new PrimitiveIntArrayList(4); in test_spliterator_intOffsetBasic() local [all …]
|
D | PrimitiveIteratorTest.java | 94 final ArrayList<Integer> recorder = new ArrayList<>(); in testIntIterator_forEachRemaining_Consumer() local 96 cit.forEachRemaining((int i) -> recorder.add(i)); in testIntIterator_forEachRemaining_Consumer() 98 assertEquals(Arrays.asList(1, 2, 4, 5), recorder); in testIntIterator_forEachRemaining_Consumer() 111 final ArrayList<Integer> recorder = new ArrayList<>(); in testIntIterator_forEachRemaining_boxedConsumer() local 113 cit.forEachRemaining((Integer i) -> recorder.add(i)); in testIntIterator_forEachRemaining_boxedConsumer() 115 assertEquals(Arrays.asList(1, 2, 4, 5), recorder); in testIntIterator_forEachRemaining_boxedConsumer() 122 assertEquals(recorder, recorder2); in testIntIterator_forEachRemaining_boxedConsumer() 141 final ArrayList<Long> recorder = new ArrayList<>(); in testLongIterator_forEachRemaining_Consumer() local 143 cit.forEachRemaining((long i) -> recorder.add(i)); in testLongIterator_forEachRemaining_Consumer() 145 assertEquals(Arrays.asList(1L, 2L, 4L, 5L), recorder); in testLongIterator_forEachRemaining_Consumer() [all …]
|
D | ForEachRemainingTester.java | 55 ArrayList<T> recorder = new ArrayList<>(); in test_forEachRemaining_list() local 58 lit.forEachRemaining((T i) -> recorder.add(i)); in test_forEachRemaining_list() 60 assertEquals(initialData.length - 1, recorder.size()); in test_forEachRemaining_list() 62 assertEquals(initialData[i], recorder.get(i - 1)); in test_forEachRemaining_list() 71 ArrayList<T> recorder = new ArrayList<>(); in test_forEachRemaining() local 72 collection.iterator().forEachRemaining((T i) -> recorder.add(i)); in test_forEachRemaining() 74 assertEquals(new ArrayList<T>(collection), recorder); in test_forEachRemaining() 76 recorder.clear(); in test_forEachRemaining() 80 it.forEachRemaining((T i) -> recorder.add(i)); in test_forEachRemaining() 82 assertEquals(initialData.length - 1, recorder.size()); in test_forEachRemaining() [all …]
|
D | SpliteratorTester.java | 45 List<T> recorder = new ArrayList<T>(expectedElements.size()); in runBasicIterationTests() local 46 Consumer<T> consumer = (T value) -> recorder.add(value); in runBasicIterationTests() 54 assertEquals(expectedElements, recorder); in runBasicIterationTests() 63 ArrayList<T> recorder = new ArrayList<T>(expectedElements.size()); in runBasicIterationTests_unordered() local 64 Consumer<T> consumer = (T value) -> recorder.add(value); in runBasicIterationTests_unordered() 71 assertTrue(expectedElements.contains(recorder.get(0))); in runBasicIterationTests_unordered() 77 Collections.sort(recorder, comparator); in runBasicIterationTests_unordered() 78 assertEquals(expectedElements, recorder); in runBasicIterationTests_unordered() 86 Spliterator<T> spliterator, ArrayList<T> recorder) { in recordAndAssertBasicIteration() argument 87 spliterator.tryAdvance(value -> recorder.add(value)); in recordAndAssertBasicIteration() [all …]
|
D | OptionalIntTest.java | 54 IntConsumer recorder = value -> reference.set(value);; in testIfPresent() local 55 OptionalInt.of(56).ifPresent(recorder); in testIfPresent()
|
D | OptionalDoubleTest.java | 56 DoubleConsumer recorder = value -> reference.set(value); in testIfPresent() local 57 OptionalDouble.of(56.0).ifPresent(recorder); in testIfPresent()
|
D | OptionalLongTest.java | 59 LongConsumer recorder = (long value) -> reference.set(value); in testIfPresent() local 60 OptionalLong.of(56).ifPresent(recorder); in testIfPresent()
|
/libcore/ojluni/src/test/java/lang/StackWalker/ |
D | StackWalkTest.java | 89 StackRecorderUtil recorder; field in StackWalkTest 134 if (count >= recorder.frameCount()) { in consume() 157 recorder.compareFrame(count, sf); in consume() 168 recorder.add(Call.class, "walk", "StackWalkTest.java"); in walk() 174 for (StackRecorderUtil.TestFrame f : recorder) { in walk() 180 long recFrameCount = (long)recorder.frameCount(); in walk() 183 swFrameCount + ") than recorded ("+ recorder.frameCount() + in walk() 193 recorder.add(Call.class, "call", "StackWalkTest.java"); in call() 205 recorder.add(Marker.class, "call", "StackWalkTest.java"); in call() 218 recorder.add(Test.class, "call", "StackWalkTest.java"); in call() [all …]
|
D | VerifyStackTrace.java | 298 final Recorder recorder = new Recorder(); in test() local 300 f -> recorder.recordSTE(counter.incrementAndGet(), builder, f)); in test() 321 System.out.println("Main found: " + recorder.found); in test()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | ArraysTest.java | 4238 ArrayList<String> recorder = new ArrayList<>(); in test_spliterator_ref() local 4239 sp1.forEachRemaining(value -> recorder.add(value)); in test_spliterator_ref() 4240 sp.forEachRemaining(value -> recorder.add(value)); in test_spliterator_ref() 4241 Collections.sort(recorder); in test_spliterator_ref() 4242 assertEquals(expected, recorder); in test_spliterator_ref() 4263 ArrayList<String> recorder = new ArrayList<>(); in test_spliterator_ref_bounds() local 4264 sp1.forEachRemaining(value -> recorder.add(value)); in test_spliterator_ref_bounds() 4265 sp.forEachRemaining(value -> recorder.add(value)); in test_spliterator_ref_bounds() 4266 Collections.sort(recorder); in test_spliterator_ref_bounds() 4267 assertEquals(expected, recorder); in test_spliterator_ref_bounds() [all …]
|