Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for testHashCode (0.07 sec)

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

      }
    
      /**
       * Returns the {@link Method} instance for {@link #testHashCode()} so that list tests on
       * unhashable objects can suppress it with {@code FeatureSpecificTestSuiteBuilder.suppressing()}.
       */
      @J2ktIncompatible
      @GwtIncompatible // reflection
      public static Method getHashCodeMethod() {
        return getMethod(ListHashCodeTester.class, "testHashCode");
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 2K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/collect/testing/testers/ListHashCodeTester.java

      }
    
      /**
       * Returns the {@link Method} instance for {@link #testHashCode()} so that list tests on
       * unhashable objects can suppress it with {@code FeatureSpecificTestSuiteBuilder.suppressing()}.
       */
      @J2ktIncompatible
      @GwtIncompatible // reflection
      public static Method getHashCodeMethod() {
        return getMethod(ListHashCodeTester.class, "testHashCode");
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 2K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/testers/SetHashCodeTester.java

    @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
    @SuppressWarnings("JUnit4ClassUsedInJUnit3")
    public class SetHashCodeTester<E> extends AbstractSetTester<E> {
      public void testHashCode() {
        int expectedHashCode = 0;
        for (E element : getSampleElements()) {
          expectedHashCode += ((element == null) ? 0 : element.hashCode());
        }
        assertEquals(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/testers/SetHashCodeTester.java

    @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
    @SuppressWarnings("JUnit4ClassUsedInJUnit3")
    public class SetHashCodeTester<E> extends AbstractSetTester<E> {
      public void testHashCode() {
        int expectedHashCode = 0;
        for (E element : getSampleElements()) {
          expectedHashCode += ((element == null) ? 0 : element.hashCode());
        }
        assertEquals(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/MultisetsImmutableEntryTest.java

        assertFalse(entry(NE, 1).equals(control("bar", 1)));
        assertFalse(entry(NE, 1).equals(new Object()));
        assertFalse(entry(NE, 1).equals(null));
      }
    
      public void testHashCode() {
        assertEquals(control("foo", 1).hashCode(), entry("foo", 1).hashCode());
        assertEquals(control("bar", 2).hashCode(), entry("bar", 2).hashCode());
      }
    
      public void testHashCodeNull() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/MultisetsImmutableEntryTest.java

        assertFalse(entry(NE, 1).equals(control("bar", 1)));
        assertFalse(entry(NE, 1).equals(new Object()));
        assertFalse(entry(NE, 1).equals(null));
      }
    
      public void testHashCode() {
        assertEquals(control("foo", 1).hashCode(), entry("foo", 1).hashCode());
        assertEquals(control("bar", 2).hashCode(), entry("bar", 2).hashCode());
      }
    
      public void testHashCodeNull() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  7. compat/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java

            assertVersionOlder("1.0-RC1", "1.0-SNAPSHOT");
            assertVersionOlder("1.0-rc1", "1.0-SNAPSHOT");
            assertVersionOlder("1.0-rc-1", "1.0-SNAPSHOT");
        }
    
        @Test
        void testHashCode() {
            ArtifactVersion v1 = newArtifactVersion("1");
            ArtifactVersion v2 = newArtifactVersion("1.0");
            assertTrue(v1.equals(v2));
            assertEquals(v1.hashCode(), v2.hashCode());
        }
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/AbstractMapEntryTest.java

        assertFalse(entry(NK, 1).equals(control("bar", 1)));
        assertFalse(entry(NK, 1).equals(new Object()));
        assertFalse(entry(NK, 1).equals(null));
      }
    
      public void testHashCode() {
        assertEquals(control("foo", 1).hashCode(), entry("foo", 1).hashCode());
        assertEquals(control("bar", 2).hashCode(), entry("bar", 2).hashCode());
      }
    
      public void testHashCodeNull() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/MapInterfaceTest.java

          }
        } else {
          try {
            map.get(null);
          } catch (NullPointerException optional) {
          }
        }
        assertInvariants(map);
      }
    
      public void testHashCode() {
        Map<K, V> map;
        try {
          map = makePopulatedMap();
        } catch (UnsupportedOperationException e) {
          return;
        }
        assertInvariants(map);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 43.8K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/MapInterfaceTest.java

          }
        } else {
          try {
            map.get(null);
          } catch (NullPointerException optional) {
          }
        }
        assertInvariants(map);
      }
    
      public void testHashCode() {
        Map<K, V> map;
        try {
          map = makePopulatedMap();
        } catch (UnsupportedOperationException e) {
          return;
        }
        assertInvariants(map);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 43.8K bytes
    - Viewed (0)
Back to top