Home
last modified time | relevance | path

Searched refs:counter (Results 1 – 25 of 57) sorted by relevance

123

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DArraysTest.java86 for (int counter = 0; counter < arraySize; counter++) { in test_asList$Ljava_lang_Object()
89 convertedList.get(counter) == objectArray[counter]); in test_asList$Ljava_lang_Object()
101 for (int counter = 0; counter < arraySize; counter++) { in test_asList$Ljava_lang_Object()
104 convertedList.get(counter) == myArray[counter]); in test_asList$Ljava_lang_Object()
120 for (byte counter = 0; counter < arraySize; counter++) in test_binarySearch$BB()
122 Arrays.binarySearch(byteArray, counter) == counter); in test_binarySearch$BB()
128 for (byte counter = 0; counter < arraySize; counter++) in test_binarySearch$BB()
129 byteArray[counter] -= 50; in test_binarySearch$BB()
130 for (byte counter = 0; counter < arraySize; counter++) in test_binarySearch$BB()
133 Arrays.binarySearch(byteArray, (byte) (counter - 50)) == counter); in test_binarySearch$BB()
[all …]
DEmptyStackExceptionTest.java34 for (int counter = 0; counter < objArray.length + 1; counter++) in test_Constructor()
47 for (int counter = 0; counter < objArray.length; counter++) { in setUp()
48 objArray[counter] = Integer.valueOf(counter); in setUp()
52 for (int counter = 0; counter < objArray.length; counter++) { in setUp()
53 s.push(objArray[counter]); in setUp()
DRandomTest.java65 for (int counter = 0; counter < 100; counter++) in test_nextBoolean()
85 for (int counter = 1; counter < randomBytes.length; counter++) in test_nextBytes$B()
86 if (randomBytes[counter] != firstByte) in test_nextBytes$B()
102 for (int counter = 0; counter < 100; counter++) { in test_nextDouble()
126 for (int counter = 0; counter < 100; counter++) { in test_nextFloat()
149 for (int counter = 0; counter < 100; counter++) { in test_nextGaussian()
172 for (int counter = 0; counter < 100; counter++) { in test_nextInt()
192 for (int counter = 0; counter < 100; counter++) { in test_nextIntI()
216 for (int counter = 0; counter < 100; counter++) { in test_nextLong()
DTreeSetTest.java66 for (int counter = 0; counter < objArray.length; counter++) in test_ConstructorLjava_util_Collection()
68 .contains(objArray[counter])); in test_ConstructorLjava_util_Collection()
100 for (int counter = 0; counter < objArray.length; counter++) in test_ConstructorLjava_util_SortedSet()
102 anotherTreeSet.contains(objArray[counter])); in test_ConstructorLjava_util_SortedSet()
279 for (int counter = startPos; counter < endPos; counter++) in test_subSetLjava_lang_ObjectLjava_lang_Object()
281 aSubSet.contains(objArray[counter])); in test_subSetLjava_lang_ObjectLjava_lang_Object()
DArrays2Test.java123 for (int counter = 0; counter < reversedArray.length; counter++) { in test_sort$D()
124 reversedArray[counter] = (reversedArray.length - counter - 1); in test_sort$D()
127 for (int counter = 0; counter < reversedArray.length; counter++) { in test_sort$D()
129 reversedArray[counter] == counter); in test_sort$D()
160 for (int counter = 0; counter < reversedArray.length; counter++) { in test_sort$F()
161 reversedArray[counter] = (reversedArray.length - counter - 1); in test_sort$F()
164 for (int counter = 0; counter < reversedArray.length; counter++) { in test_sort$F()
166 reversedArray[counter] == counter); in test_sort$F()
DIdentityHashMap2Test.java92 for (int counter = 0; counter < hmSize; counter++) in test_ConstructorLjava_util_Map()
93 myMap.put(objArray2[counter], objArray[counter]); in test_ConstructorLjava_util_Map()
95 for (int counter = 0; counter < hmSize; counter++) in test_ConstructorLjava_util_Map()
97 .get(objArray2[counter]) == hm2.get(objArray2[counter])); in test_ConstructorLjava_util_Map()
133 for (int counter = 0; counter < hmSize; counter++) in test_clone()
135 .get(objArray2[counter]) == hm2.get(objArray2[counter])); in test_clone()
DTimerTest.java1039 final AtomicLong counter = new AtomicLong(); in testCanBeCancelledEvenIfTaskKeepsItPermanentlyBusy() local
1044 counter.incrementAndGet(); in testCanBeCancelledEvenIfTaskKeepsItPermanentlyBusy()
1055 assertTrue(counter.get() > 0); in testCanBeCancelledEvenIfTaskKeepsItPermanentlyBusy()
1077 final AtomicLong counter = new AtomicLong(); in testTaskNotCancelledWhenTimerCancelled() local
1082 counter.incrementAndGet(); in testTaskNotCancelledWhenTimerCancelled()
1099 final AtomicLong counter = new AtomicLong(); in testTaskNotCancelledWhenTimerCancelledAndPurged() local
1104 counter.incrementAndGet(); in testTaskNotCancelledWhenTimerCancelledAndPurged()
1121 private final AtomicLong counter; field in TimerTest.IncrementCounterTaskAndPossiblyThrowAfter
1127 AtomicLong counter, int incrementAmount, boolean willThrow) { in IncrementCounterTaskAndPossiblyThrowAfter() argument
1128 this.counter = counter; in IncrementCounterTaskAndPossiblyThrowAfter()
[all …]
DConcurrentModificationExceptionTest.java57 for (int counter = 0; counter < 50; counter++) in test_Constructor()
58 myCollection.add(Integer.valueOf(counter)); in test_Constructor()
/libcore/jsr166-tests/src/test/java/jsr166/
DThreadLocalRandom8Test.java76 LongAdder counter = new LongAdder(); in testIntsCount() local
80 counter.reset(); in testIntsCount()
81 r.ints(size).parallel().forEach(x -> counter.increment()); in testIntsCount()
82 assertEquals(size, counter.sum()); in testIntsCount()
91 LongAdder counter = new LongAdder(); in testLongsCount() local
95 counter.reset(); in testLongsCount()
96 r.longs(size).parallel().forEach(x -> counter.increment()); in testLongsCount()
97 assertEquals(size, counter.sum()); in testLongsCount()
106 LongAdder counter = new LongAdder(); in testDoublesCount() local
110 counter.reset(); in testDoublesCount()
[all …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DThreadLocalRandom8Test.java99 LongAdder counter = new LongAdder(); in testIntsCount() local
103 counter.reset(); in testIntsCount()
104 r.ints(size).parallel().forEach(x -> counter.increment()); in testIntsCount()
105 assertEquals(size, counter.sum()); in testIntsCount()
114 LongAdder counter = new LongAdder(); in testLongsCount() local
118 counter.reset(); in testLongsCount()
119 r.longs(size).parallel().forEach(x -> counter.increment()); in testLongsCount()
120 assertEquals(size, counter.sum()); in testLongsCount()
129 LongAdder counter = new LongAdder(); in testDoublesCount() local
133 counter.reset(); in testDoublesCount()
[all …]
DSplittableRandomTest.java393 LongAdder counter = new LongAdder();
397 counter.reset();
398 r.ints(size).parallel().forEach(x -> counter.increment());
399 assertEquals(size, counter.sum());
408 LongAdder counter = new LongAdder();
412 counter.reset();
413 r.longs(size).parallel().forEach(x -> counter.increment());
414 assertEquals(size, counter.sum());
423 LongAdder counter = new LongAdder();
427 counter.reset();
[all …]
/libcore/ojluni/src/test/java/util/Random/
DRandomTest.java232 LongAdder counter = new LongAdder(); in testIntsCount() local
236 counter.reset(); in testIntsCount()
238 counter.increment(); in testIntsCount()
240 assertEquals(counter.sum(), size); in testIntsCount()
249 LongAdder counter = new LongAdder(); in testLongsCount() local
253 counter.reset(); in testLongsCount()
255 counter.increment(); in testLongsCount()
257 assertEquals(counter.sum(), size); in testLongsCount()
266 LongAdder counter = new LongAdder(); in testDoublesCount() local
270 counter.reset(); in testDoublesCount()
[all …]
/libcore/support/src/test/java/tests/support/
DSupport_UnmodifiableCollectionTest.java78 for (int counter = 0; it.hasNext(); counter++) { in runTest()
82 + counter + " got: " + nextValue, in runTest()
83 nextValue == counter); in runTest()
94 for (int counter = 0; it.hasNext(); counter++) { in runTest()
97 objArray[counter] == it.next()); in runTest()
103 for (int counter = 0; it.hasNext(); counter++) { in runTest()
106 objArray[counter] == it.next()); in runTest()
DSupport_ListTest.java41 for (int counter = 0; counter < 100; counter++) { in runTest()
43 elem = list.get(counter); in runTest()
46 .equals(Integer.valueOf(counter))); in runTest()
117 for (int counter = 0; li.hasNext(); counter++) { in runTest()
121 .equals(Integer.valueOf(counter))); in runTest()
/libcore/ojluni/src/main/java/javax/crypto/spec/
DChaCha20ParameterSpec.java50 private final int counter; field in ChaCha20ParameterSpec
63 public ChaCha20ParameterSpec(byte[] nonce, int counter) { in ChaCha20ParameterSpec() argument
64 this.counter = counter; in ChaCha20ParameterSpec()
90 return counter; in getCounter()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DPasswordAuthenticationTest.java39 for (int counter = password.length - 1; counter >= 0; counter--) in test_ConstructorLjava_lang_String$C()
41 returnedPassword[counter] == password[counter]); in test_ConstructorLjava_lang_String$C()
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DSequentialOpTest.java55 AtomicInteger counter = new AtomicInteger(); in testLazy() local
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()
63 counter.incrementAndGet(); in testLazy()
65 …(UnaryOperator<Stream<Integer>>) s -> s.parallel().map(id).peek(e -> { counter.incrementAndGet(); … in testLazy()
74 counter.set(0); in testLazy()
76 assertEquals(0, counter.get()); in testLazy()
79 assertEquals(0, counter.get()); in testLazy()
83 assertTrue(data.size() == 0 || counter.get() > 0); in testLazy()
[all …]
/libcore/ojluni/src/main/java/java/text/
DCharacterIteratorFieldDelegate.java118 for (int counter = 0; counter < iCount; counter++) { in getIterator()
119 iterators[counter] = attributedStrings. in getIterator()
120 get(counter).getIterator(); in getIterator()
/libcore/luni/src/test/java/libcore/dalvik/system/
DZipPathValidatorTest.java88 int counter = 0; in testZipFileCallback() local
91 verify(mockZipCallback).onZipEntryAccess(entryNames[counter]); in testZipFileCallback()
92 counter++; in testZipFileCallback()
113 int counter = 0; in testZipInputStreamCallback() local
125 verify(mockZipCallback).onZipEntryAccess(entryNames[counter]); in testZipInputStreamCallback()
126 counter++; in testZipInputStreamCallback()
/libcore/luni/src/test/java/libcore/java/util/
DOldTreeSetTest.java40 for (int counter = 0; counter < objArray.length; counter++) in test_ConstructorLjava_util_Collection()
42 .contains(objArray[counter])); in test_ConstructorLjava_util_Collection()
187 for (int counter = startPos; counter < endPos; counter++) in test_subSetLjava_lang_ObjectLjava_lang_Object()
189 aSubSet.contains(objArray[counter])); in test_subSetLjava_lang_ObjectLjava_lang_Object()
/libcore/luni/src/test/java/tests/javax/crypto/spec/
DChaCha20ParameterSpecTest.java40 int counter = 1234567890; in constructor_withValidValues() local
41 ChaCha20ParameterSpec spec = new ChaCha20ParameterSpec(nonce, counter); in constructor_withValidValues()
43 assertEquals(counter, spec.getCounter()); in constructor_withValidValues()
/libcore/ojluni/src/test/java/util/Timer/
DAutoStop.java40 static volatile int counter = 0; field in AutoStop
70 ++counter; in main()
84 int finalCounter = counter; in main()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DPrintStreamTest.java671 CountFlushOutputStream counter = new CountFlushOutputStream(new ByteArrayOutputStream()); in test_autoFlush_flushesEverything() local
672 PrintStream printStream = new PrintStream(counter, true /* autoFlush */); in test_autoFlush_flushesEverything()
674 assertTrue(counter.hasBeenFlushedSinceLastWrite()); in test_autoFlush_flushesEverything()
676 assertTrue(counter.hasBeenFlushedSinceLastWrite()); in test_autoFlush_flushesEverything()
678 assertTrue(counter.hasBeenFlushedSinceLastWrite()); in test_autoFlush_flushesEverything()
680 assertTrue(counter.hasBeenFlushedSinceLastWrite()); in test_autoFlush_flushesEverything()
682 assertTrue(counter.hasBeenFlushedSinceLastWrite()); in test_autoFlush_flushesEverything()
684 assertTrue(counter.hasBeenFlushedSinceLastWrite()); in test_autoFlush_flushesEverything()
688 assertTrue(counter.hasBeenFlushedSinceLastWrite()); in test_autoFlush_flushesEverything()
696 CountFlushOutputStream counter = new CountFlushOutputStream(new ByteArrayOutputStream()); in test_noAutoFlush() local
[all …]
/libcore/luni/src/test/java/tests/security/
DSecureRandomTest.java31 private int counter = 0; field in SecureRandomTest
67 random.setSeed(System.currentTimeMillis()+counter); in getRandomBytes()
68 counter++; in getRandomBytes()
/libcore/luni/src/test/java/libcore/java/lang/ref/
DFinalizeTest.java143 public void createChainedFinalizer(final AtomicInteger counter, final AtomicBoolean keepGoing) { in createChainedFinalizer() argument
146 int count = counter.incrementAndGet(); in createChainedFinalizer()
149 createChainedFinalizer(counter, keepGoing); // recursive! in createChainedFinalizer()

123