Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,257 for New (0.18 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

      private final ExecutionList list = new ExecutionList();
    
      public void testRunOnPopulatedList() throws Exception {
        Executor exec = Executors.newCachedThreadPool();
        CountDownLatch countDownLatch = new CountDownLatch(3);
        list.add(new MockRunnable(countDownLatch), exec);
        list.add(new MockRunnable(countDownLatch), exec);
        list.add(new MockRunnable(countDownLatch), exec);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 4.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/ByteSinkTest.java

        TestByteSink failSink = new TestByteSink(WRITE_THROWS);
        assertThrows(IOException.class, () -> new TestByteSource(new byte[10]).copyTo(failSink));
        assertTrue(failSink.wasStreamClosed());
      }
    
      public void testClosesOnErrors_writingFromInputStreamThatThrows() throws IOException {
        TestByteSink okSink = new TestByteSink();
        TestInputStream in = new TestInputStream(new ByteArrayInputStream(new byte[10]), READ_THROWS);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

        final AtomicBoolean interruptedExceptionThrown = new AtomicBoolean();
        final CountDownLatch enterLatch = new CountDownLatch(1);
        final CountDownLatch exitLatch = new CountDownLatch(1);
        final TrustedListenableFutureTask<Integer> task =
            TrustedListenableFutureTask.create(
                new Callable<Integer>() {
                  @Override
                  public Integer call() throws Exception {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/TestsForQueuesInJavaUtil.java

     *
     * @author Jared Levy
     */
    @GwtIncompatible
    public class TestsForQueuesInJavaUtil {
      public static Test suite() {
        return new TestsForQueuesInJavaUtil().allTests();
      }
    
      public Test allTests() {
        TestSuite suite = new TestSuite();
        suite.addTest(testsForArrayDeque());
        suite.addTest(testsForLinkedList());
        suite.addTest(testsForArrayBlockingQueue());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 9.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/io/CharSequenceReaderTest.java

        assertEquals(expected, new String(buf));
        assertFullyRead(reader);
    
        // read in chunks to fixed array
        reader = new CharSequenceReader(charSequence);
        buf = new char[5];
        StringBuilder builder = new StringBuilder();
        int read;
        while ((read = reader.read(buf, 0, buf.length)) != -1) {
          builder.append(buf, 0, read);
        }
        assertEquals(expected, builder.toString());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/SupplementalMonitorTest.java

          int expectedOccupiedDepth) {
        final AtomicBoolean actualIsOccupied = new AtomicBoolean();
        final AtomicBoolean actualIsOccupiedByCurrentThread = new AtomicBoolean();
        final AtomicInteger actualOccupiedDepth = new AtomicInteger();
        final AtomicReference<Throwable> thrown = new AtomicReference<>();
        joinUninterruptibly(
            startThread(
                new Runnable() {
                  @Override
                  public void run() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

        MockCallback callback = new MockCallback(e);
        addCallback(f, callback, directExecutor());
      }
    
      public void testOnSuccessThrowsRuntimeException() throws Exception {
        RuntimeException exception = new RuntimeException();
        String result = "result";
        SettableFuture<String> future = SettableFuture.create();
        int[] successCalls = new int[1];
        int[] failureCalls = new int[1];
        FutureCallback<String> callback =
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 6.3K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/JdkFutureAdaptersTest.java

        final CountDownLatch submitSuccessful = new CountDownLatch(1);
        ExecutorService executorService =
            new ThreadPoolExecutor(
                0,
                Integer.MAX_VALUE,
                60L,
                TimeUnit.SECONDS,
                new SynchronousQueue<Runnable>(),
                new ThreadFactoryBuilder().setDaemon(true).build()) {
              @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 9.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

          new ListenerCallQueue.Event<Object>() {
            @Override
            public void call(Object object) {
              throw new RuntimeException();
            }
    
            @Override
            public String toString() {
              return "throwing()";
            }
          };
    
      public void testEnqueueAndDispatch() {
        Object listener = new Object();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/MonitorTestCase.java

      private final TearDownStack tearDownStack = new TearDownStack(true);
      private TestThread<Monitor> thread1;
      private TestThread<Monitor> thread2;
    
      protected MonitorTestCase(boolean interruptible) {
        this.interruptible = interruptible;
      }
    
      @Override
      protected final void setUp() throws Exception {
        boolean fair = new Random().nextBoolean();
        monitor = new Monitor(fair);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 7.9K bytes
    - Viewed (0)
Back to top