Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 64 for wrong (0.31 sec)

  1. guava-testlib/src/com/google/common/collect/testing/testers/CollectionContainsAllTester.java

      }
    
      public void testContainsAll_wrongType() {
        Collection<WrongType> wrong = MinimalCollection.of(WrongType.VALUE);
        try {
          assertFalse(
              "containsAll(wrongType) should return false or throw", collection.containsAll(wrong));
        } catch (ClassCastException tolerated) {
        }
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/base/StringsRepeatBenchmark.java

      void oldRepeat(long reps) {
        for (int i = 0; i < reps; i++) {
          String x = oldRepeat(originalString, count);
          if (x.length() != (originalString.length() * count)) {
            throw new RuntimeException("Wrong length: " + x);
          }
        }
      }
    
      private static String oldRepeat(String string, int count) {
        // If this multiplication overflows, a NegativeArraySizeException or
        // OutOfMemoryError is not far behind
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Sep 17 20:24:24 GMT 2021
    - 3.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/primitives/BooleansTest.java

        assertThat(Booleans.asList(ARRAY_FALSE_TRUE).size()).isEqualTo(2);
      }
    
      @SuppressWarnings("BooleanArrayIndexOfBoolean")
      public void testAsListIndexOf() {
        assertThat(Booleans.asList(EMPTY).indexOf((Object) "wrong type")).isEqualTo(-1);
        assertThat(Booleans.asList(EMPTY).indexOf(true)).isEqualTo(-1);
        assertThat(Booleans.asList(ARRAY_FALSE).indexOf(true)).isEqualTo(-1);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 15:43:29 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/primitives/BooleansTest.java

        assertThat(Booleans.asList(ARRAY_FALSE_TRUE).size()).isEqualTo(2);
      }
    
      @SuppressWarnings("BooleanArrayIndexOfBoolean")
      public void testAsListIndexOf() {
        assertThat(Booleans.asList(EMPTY).indexOf((Object) "wrong type")).isEqualTo(-1);
        assertThat(Booleans.asList(EMPTY).indexOf(true)).isEqualTo(-1);
        assertThat(Booleans.asList(ARRAY_FALSE).indexOf(true)).isEqualTo(-1);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 15:43:29 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionContainsAllTester.java

      }
    
      public void testContainsAll_wrongType() {
        Collection<WrongType> wrong = MinimalCollection.of(WrongType.VALUE);
        try {
          assertFalse(
              "containsAll(wrongType) should return false or throw", collection.containsAll(wrong));
        } catch (ClassCastException tolerated) {
        }
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/base/AndroidIncompatible.java

     *       probably require adding the dep to various ACLs, license files, and Proguard
     *       configurations, and there's always the potential that something will go wrong. It
     *       <i>probably</i> won't, since the deps are needed only in tests (and maybe someday in
     *       testlib), but why bother?
     *   <li>Stripping code entirely might help us keep under the method limit someday. Even if it never
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Jul 07 15:40:13 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/reflect/MutableTypeToInstanceMapTest.java

      }
    
      public void testEntrySetToArrayMutationThrows() {
        map.putInstance(String.class, "test");
        @SuppressWarnings("unchecked") // Should get a CCE later if cast is wrong
        Entry<?, Object> entry = (Entry<?, Object>) map.entrySet().toArray()[0];
        assertEquals(TypeToken.of(String.class), entry.getKey());
        assertEquals("test", entry.getValue());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/base/StringsRepeatBenchmark.java

      void oldRepeat(long reps) {
        for (int i = 0; i < reps; i++) {
          String x = oldRepeat(originalString, count);
          if (x.length() != (originalString.length() * count)) {
            throw new RuntimeException("Wrong length: " + x);
          }
        }
      }
    
      private static String oldRepeat(String string, int count) {
        // If this multiplication overflows, a NegativeArraySizeException or
        // OutOfMemoryError is not far behind
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Sep 17 20:24:24 GMT 2021
    - 3.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Multiset.java

       *
       * <p>This method refines {@link Collection#remove} to further specify that it <b>may not</b>
       * throw an exception in response to {@code element} being null or of the wrong type.
       *
       * <p>To both remove the element and obtain the previous count of that element, use {@link
       * #remove(Object, int) remove}{@code (element, 1)} instead.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Sat Jun 17 14:40:53 GMT 2023
    - 19.7K bytes
    - Viewed (0)
  10. android/guava-testlib/test/com/google/common/collect/testing/IteratorTesterTest.java

                return new Iterator<Integer>() {
                  @Override
                  public void remove() {
                    // Wrong exception type.
                    throw new IllegalArgumentException();
                  }
    
                  @Override
                  public Integer next() {
                    // Wrong exception type.
                    throw new UnsupportedOperationException();
                  }
    
                  @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 12:41:04 GMT 2023
    - 10.4K bytes
    - Viewed (0)
Back to top