Home
last modified time | relevance | path

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

12

/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] = new Integer(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()
DConcurrentModificationExceptionTest.java57 for (int counter = 0; counter < 50; counter++) in test_Constructor()
58 myCollection.add(new Integer(counter)); in test_Constructor()
DTimerTest.java1031 final AtomicLong counter = new AtomicLong(); in testCanBeCancelledEvenIfTaskKeepsItPermanentlyBusy() local
1036 counter.incrementAndGet(); in testCanBeCancelledEvenIfTaskKeepsItPermanentlyBusy()
1047 assertTrue(counter.get() > 0); in testCanBeCancelledEvenIfTaskKeepsItPermanentlyBusy()
1069 final AtomicLong counter = new AtomicLong(); in testTaskNotCancelledWhenTimerCancelled() local
1074 counter.incrementAndGet(); in testTaskNotCancelledWhenTimerCancelled()
1091 final AtomicLong counter = new AtomicLong(); in testTaskNotCancelledWhenTimerCancelledAndPurged() local
1096 counter.incrementAndGet(); in testTaskNotCancelledWhenTimerCancelledAndPurged()
1113 private final AtomicLong counter; field in TimerTest.IncrementCounterTaskAndPossiblyThrowAfter
1119 AtomicLong counter, int incrementAmount, boolean willThrow) { in IncrementCounterTaskAndPossiblyThrowAfter() argument
1120 this.counter = counter; in IncrementCounterTaskAndPossiblyThrowAfter()
[all …]
DHashMapTest.java160 for (int counter = 0; counter < hmSize; counter++) in test_ConstructorLjava_util_Map()
161 myMap.put(objArray2[counter], objArray[counter]); in test_ConstructorLjava_util_Map()
163 for (int counter = 0; counter < hmSize; counter++) in test_ConstructorLjava_util_Map()
165 .get(objArray2[counter]) == hm2.get(objArray2[counter])); in test_ConstructorLjava_util_Map()
201 for (int counter = 0; counter < hmSize; counter++) in test_clone()
203 .get(objArray2[counter]) == hm2.get(objArray2[counter])); in test_clone()
DLinkedHashMapTest.java129 for (int counter = 0; counter < hmSize; counter++) in test_ConstructorLjava_util_Map()
130 myMap.put(objArray2[counter], objArray[counter]); in test_ConstructorLjava_util_Map()
132 for (int counter = 0; counter < hmSize; counter++) in test_ConstructorLjava_util_Map()
134 .get(objArray2[counter]) == hm2.get(objArray2[counter])); in test_ConstructorLjava_util_Map()
373 for (int counter = 0; counter < hmSize; counter++) in test_clone()
375 .get(objArray2[counter]) == hm2.get(objArray2[counter])); in test_clone()
DStringTokenizerTest.java115 for (int counter = 0; counter < 5; counter++) { in test_hasMoreTokens()
DIdentityHashMapTest.java102 for (int counter = 0; counter < hmSize; counter++) in test_ConstructorLjava_util_Map()
103 myMap.put(objArray2[counter], objArray[counter]); in test_ConstructorLjava_util_Map()
105 for (int counter = 0; counter < hmSize; counter++) in test_ConstructorLjava_util_Map()
107 .get(objArray2[counter]) == hm2.get(objArray2[counter])); in test_ConstructorLjava_util_Map()
141 for (int counter = 0; counter < hmSize; counter++) in test_clone()
143 .get(objArray2[counter]) == hm2.get(objArray2[counter])); in test_clone()
/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/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(new Integer(counter))); in runTest()
117 for (int counter = 0; li.hasNext(); counter++) { in runTest()
121 .equals(new Integer(counter))); in runTest()
/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/luni/src/main/java/java/nio/charset/
DModifiedUtf8.java38 long counter = 0; in countBytes() local
43 counter++; in countBytes()
45 counter++; in countBytes()
48 counter += 2; in countBytes()
50 counter += 3; in countBytes()
55 if (shortLength && counter > 0xffff) { in countBytes()
59 return counter; in countBytes()
/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/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/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()
/libcore/luni/src/test/java/libcore/java/net/
DOldSocketImplFactoryTest.java66 int counter = 0; in setUp() local
69 counter++; in setUp()
74 if(counter == 1) { in setUp()
DOldDatagramSocketImplFactoryTest.java85 int counter = 0; in setUp() local
88 counter++; in setUp()
93 if(counter == 1) { in setUp()

12