- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 69 for counter (0.17 sec)
-
guava-tests/test/com/google/common/io/CountingOutputStreamTest.java
counter.write(data, 0, 5); written += 5; assertEquals(written, out.size()); assertEquals(written, counter.getCount()); counter.write(data, 2, 5); written += 5; assertEquals(written, out.size()); assertEquals(written, counter.getCount()); // Test that illegal arguments do not affect count
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 1.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CountingOutputStreamTest.java
counter.write(data, 0, 5); written += 5; assertEquals(written, out.size()); assertEquals(written, counter.getCount()); counter.write(data, 2, 5); written += 5; assertEquals(written, out.size()); assertEquals(written, counter.getCount()); // Test that illegal arguments do not affect count
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 1.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/MultiInputStreamTest.java
} public void testOnlyOneOpen() throws Exception { final ByteSource source = newByteSource(0, 50); final int[] counter = new int[1]; ByteSource checker = new ByteSource() { @Override public InputStream openStream() throws IOException { if (counter[0]++ != 0) { throw new IllegalStateException("More than one source open"); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 4.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/MultiInputStreamTest.java
} public void testOnlyOneOpen() throws Exception { final ByteSource source = newByteSource(0, 50); final int[] counter = new int[1]; ByteSource checker = new ByteSource() { @Override public InputStream openStream() throws IOException { if (counter[0]++ != 0) { throw new IllegalStateException("More than one source open"); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 4.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/primitives/ImmutableLongArrayTest.java
void doIt(ImmutableLongArray.Builder builder, AtomicLong counter) { builder.add(counter.getAndIncrement()); } }, ADD_ARRAY { @Override void doIt(ImmutableLongArray.Builder builder, AtomicLong counter) { long[] array = new long[RANDOM.nextInt(10)]; for (int i = 0; i < array.length; i++) { array[i] = counter.getAndIncrement(); } builder.addAll(array);
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Jun 01 09:32:35 GMT 2023 - 20.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java
void doIt(ImmutableDoubleArray.Builder builder, AtomicInteger counter) { builder.add(counter.getAndIncrement()); } }, ADD_ARRAY { @Override void doIt(ImmutableDoubleArray.Builder builder, AtomicInteger counter) { double[] array = new double[RANDOM.nextInt(10)]; for (int i = 0; i < array.length; i++) { array[i] = counter.getAndIncrement(); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Jun 06 15:23:21 GMT 2023 - 20K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/AbstractCacheTest.java
public void testSingleSimpleStats() { StatsCounter counter = new SimpleStatsCounter(); for (int i = 0; i < 11; i++) { counter.recordHits(1); } for (int i = 0; i < 13; i++) { counter.recordLoadSuccess(i); } for (int i = 0; i < 17; i++) { counter.recordLoadException(i); } for (int i = 0; i < 23; i++) { counter.recordMisses(1); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Apr 19 19:24:36 GMT 2023 - 6.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/TestingCacheLoaders.java
/** * Returns a {@code new Object()} for every request, and increments a counter for every request. * The count is accessible via {@link #getCount}. */ static class CountingLoader extends CacheLoader<Object, Object> { private final AtomicInteger count = new AtomicInteger(); @Override public Object load(Object from) { count.incrementAndGet(); return new Object(); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Apr 06 12:56:11 GMT 2023 - 4.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java
for (int i = 0; i < SIZE; i++) { aa.set(i, (double) COUNTDOWN); } Counter c1 = new Counter(aa); Counter c2 = new Counter(aa); Thread t1 = newStartedThread(c1); Thread t2 = newStartedThread(c2); awaitTermination(t1); awaitTermination(t2); assertEquals(SIZE * COUNTDOWN, c1.counts + c2.counts); } /** a deserialized serialized array holds same values */
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 10K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CountingInputStreamTest.java
assertEquals(-1, counter.read(new byte[30])); assertEquals(20, counter.getCount()); } @SuppressWarnings("CheckReturnValue") // calling read() to skip a byte public void testMark() throws Exception { assertTrue(counter.markSupported()); assertEquals(10, counter.read(new byte[10])); assertEquals(10, counter.getCount()); counter.mark(5); counter.read();
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 3.5K bytes - Viewed (0)