Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 749 for expected (0.18 sec)

  1. guava-tests/test/com/google/common/collect/TablesTransformValuesTest.java

      // put() and putAll() aren't supported.
      @Override
      public void testPut() {
        try {
          table.put("foo", 1, 'a');
          fail("Expected UnsupportedOperationException");
        } catch (UnsupportedOperationException expected) {
        }
        assertSize(0);
      }
    
      @Override
      public void testPutAllTable() {
        table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c');
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 16:54:11 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddAllTester.java

        try {
          Iterator<E> iterator = collection.iterator();
          assertTrue(collection.addAll(MinimalCollection.of(e3(), e0())));
          iterator.next();
          fail("Expected ConcurrentModificationException");
        } catch (ConcurrentModificationException expected) {
          // success
        }
      }
    
      @CollectionFeature.Require(absent = SUPPORTS_ADD)
      @CollectionSize.Require(absent = ZERO)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/ShortsTest.java

            // Only compare the sign of the result of compareTo().
            int expected = Short.valueOf(x).compareTo(y);
            int actual = Shorts.compare(x, y);
            if (expected == 0) {
              assertWithMessage(x + ", " + y).that(actual).isEqualTo(expected);
            } else if (expected < 0) {
              assertWithMessage(x + ", " + y + " (expected: " + expected + ", actual" + actual + ")")
                  .that(actual < 0)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 26.6K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

        try {
          future.addListener(null, directExecutor());
          fail();
        } catch (NullPointerException expected) {
        }
      }
    
      public void testNullExecutor() {
        try {
          future.addListener(doNothing(), null);
          fail();
        } catch (NullPointerException expected) {
        }
      }
    
      public void testNullTimeUnit() throws Exception {
        future.set(1);
        try {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

        boolean foundProblem = false;
        try {
          new NullPointerTester().testMethodParameter(new OneArg(), method, 0);
        } catch (AssertionFailedError expected) {
          assertThat(expected.getMessage()).contains("index 0");
          assertThat(expected.getMessage()).contains("[null]");
          foundProblem = true;
        }
        assertTrue("Should report error when different exception is thrown", foundProblem);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 47.9K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/UnmodifiableListIteratorTest.java

        Iterator<String> iterator = create();
    
        assertTrue(iterator.hasNext());
        assertEquals("a", iterator.next());
        try {
          iterator.remove();
          fail();
        } catch (UnsupportedOperationException expected) {
        }
      }
    
      @SuppressWarnings("DoNotCall")
      public void testAdd() {
        ListIterator<String> iterator = create();
    
        assertTrue(iterator.hasNext());
        assertEquals("a", iterator.next());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/ImmutableListMultimapTest.java

          builder.put(null, 1);
          fail();
        } catch (NullPointerException expected) {
        }
        try {
          builder.putAll(null, Arrays.asList(1, 2, 3));
          fail();
        } catch (NullPointerException expected) {
        }
        try {
          builder.putAll(null, 1, 2, 3);
          fail();
        } catch (NullPointerException expected) {
        }
        try {
          builder.putAll((Multimap<String, Integer>) toPut);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 23.6K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/ImmutableSetMultimapTest.java

          builder.put(null, 1);
          fail();
        } catch (NullPointerException expected) {
        }
        try {
          builder.putAll(null, Arrays.asList(1, 2, 3));
          fail();
        } catch (NullPointerException expected) {
        }
        try {
          builder.putAll(null, 1, 2, 3);
          fail();
        } catch (NullPointerException expected) {
        }
        try {
          builder.putAll((Multimap<String, Integer>) toPut);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 23.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java

        Thread waitingThread = new Thread(wasInterrupted);
        waitingThread.start();
        waitingThread.interrupt();
        ExecutionException expected =
            assertThrows(ExecutionException.class, () -> wasInterrupted.get());
        assertTrue(expected.getCause().toString(), expected.getCause() instanceof InterruptedException);
      }
    
      public void testMakeUninterruptible_timedGetZeroTimeoutAttempted()
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.1K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/testers/MapComputeTester.java

                  (k, v) -> {
                    assertEquals(k0(), k);
                    assertEquals(v0(), v);
                    throw new ExpectedException();
                  });
          fail("Expected ExpectedException");
        } catch (ExpectedException expected) {
        }
        expectUnchanged();
      }
    
      @MapFeature.Require({SUPPORTS_PUT, SUPPORTS_REMOVE})
      public void testCompute_absentFunctionThrows() {
        try {
          getMap()
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 6.8K bytes
    - Viewed (0)
Back to top