Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for testHashCode (0.06 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. android/guava-testlib/src/com/google/common/collect/testing/testers/MapHashCodeTester.java

    @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
    @SuppressWarnings("JUnit4ClassUsedInJUnit3")
    public class MapHashCodeTester<K, V> extends AbstractMapTester<K, V> {
      public void testHashCode() {
        int expectedHashCode = 0;
        for (Entry<K, V> entry : getSampleEntries()) {
          expectedHashCode += hash(entry);
        }
        assertEquals(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 3K bytes
    - Viewed (0)
  7. 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)
  8. android/guava-tests/test/com/google/common/collect/SingletonImmutableTableTest.java

    public class SingletonImmutableTableTest extends AbstractImmutableTableTest {
      private final ImmutableTable<Character, Integer, String> testTable =
          new SingletonImmutableTable<>('a', 1, "blah");
    
      public void testHashCode() {
        assertEquals(Objects.hashCode('a', 1, "blah"), testTable.hashCode());
      }
    
      public void testCellSet() {
        assertEquals(ImmutableSet.of(immutableCell('a', 1, "blah")), testTable.cellSet());
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 4K bytes
    - Viewed (0)
  9. 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)
  10. android/guava-tests/test/com/google/common/collect/SynchronizedMapTest.java

        assertSame(mutex, ((SynchronizedSet<?>) entrySet).mutex);
      }
    
      public void testEquals() {
        boolean unused = create().equals(new HashMap<String, Integer>());
      }
    
      public void testHashCode() {
        int unused = create().hashCode();
      }
    
      public void testToString() {
        String unused = create().toString();
      }
    
      public void testSerialization() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 06 17:23:04 UTC 2024
    - 5.8K bytes
    - Viewed (0)
Back to top