Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 52 for testEqual (0.04 sec)

  1. android/guava-tests/test/com/google/common/base/ObjectsTest.java

        "EqualsInteger", // test of a trivial call
        "EqualsLong", // b/273939864
        "EqualsDouble", // b/273939864
        "EqualsFloat", // b/273939864
        "YodaCondition", // test of reversed call
      })
      public void testEqual() throws Exception {
        assertTrue(Objects.equal(1, 1));
        assertTrue(Objects.equal(null, null));
    
        // test distinct string objects
        String s1 = "foobar";
        String s2 = new String(s1);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 2.6K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetEqualsTester.java

                getMultiset(), getSubjectGenerator().create(getSampleElements().toArray()))
            .testEquals();
      }
    
      @CollectionSize.Require(absent = ZERO)
      public void testNotEqualsEmpty() {
        new EqualsTester()
            .addEqualityGroup(getMultiset())
            .addEqualityGroup(getSubjectGenerator().create())
            .testEquals();
      }
    
      public void testHashCodeMatchesEntrySet() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Nov 14 23:40:07 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/testing/EqualsTester.java

    import org.jspecify.annotations.Nullable;
    
    /**
     * Tester for equals() and hashCode() methods of a class.
     *
     * <p>The simplest use case is:
     *
     * <pre>
     * new EqualsTester().addEqualityGroup(foo).testEquals();
     * </pre>
     *
     * <p>This tests {@code foo.equals(foo)}, {@code foo.equals(null)}, and a few other operations.
     *
     * <p>For more extensive testing, add multiple equality groups. Each group should contain objects
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java

            continue;
          }
          testSuccessfulForwarding(interfaceType, method, wrapperFunction);
          testExceptionPropagation(interfaceType, method, wrapperFunction);
        }
        if (testsEquals) {
          testEquals(interfaceType, wrapperFunction);
        }
        testToString(interfaceType, wrapperFunction);
      }
    
      /** Returns the most concrete public methods from {@code type}. */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 9.1K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/base/EquivalenceTest.java

            .addEquivalenceGroup("a")
            .test();
      }
    
      public void testEquals() {
        new EqualsTester()
            .addEqualityGroup(Equivalence.equals(), Equivalence.equals())
            .addEqualityGroup(Equivalence.identity(), Equivalence.identity())
            .testEquals();
      }
    
      @J2ktIncompatible
      @GwtIncompatible // NullPointerTester
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/base/EquivalenceTest.java

            .addEquivalenceGroup("a")
            .test();
      }
    
      public void testEquals() {
        new EqualsTester()
            .addEqualityGroup(Equivalence.equals(), Equivalence.equals())
            .addEqualityGroup(Equivalence.identity(), Equivalence.identity())
            .testEquals();
      }
    
      @J2ktIncompatible
      @GwtIncompatible // NullPointerTester
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/reflect/TypeParameterTest.java

      }
    
      public <A, B> void testEquals() throws Exception {
        Method method = TypeParameterTest.class.getDeclaredMethod("testEquals");
        new EqualsTester()
            .addEqualityGroup(new TypeParameter<A>() {}, new TypeParameter<A>() {})
            .addEqualityGroup(new TypeParameter<B>() {})
            .testEquals();
      }
    
      public void testNullPointers() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/google/SetMultimapAsMapTester.java

        }
      }
    
      @CollectionSize.Require(SEVERAL)
      public void testEquals() {
        resetContainer(mapEntry(k0(), v0()), mapEntry(k1(), v0()), mapEntry(k0(), v3()));
        Map<K, Collection<V>> expected = new HashMap<>();
        expected.put(k0(), newHashSet(v0(), v3()));
        expected.put(k1(), newHashSet(v0()));
        new EqualsTester().addEqualityGroup(expected, multimap().asMap()).testEquals();
      }
    
      @CollectionSize.Require(SEVERAL)
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/cache/RemovalNotificationTest.java

    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Unit tests of {@link RemovalNotification}.
     *
     * @author Ben Yu
     */
    @NullUnmarked
    public class RemovalNotificationTest extends TestCase {
    
      public void testEquals() {
        new EqualsTester()
            .addEqualityGroup(
                RemovalNotification.create("one", 1, RemovalCause.EXPLICIT),
                RemovalNotification.create("one", 1, RemovalCause.REPLACED))
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/EnumMultisetTest.java

      // create(Enum1.class) is equal to create(Enum2.class) but testEquals() expects otherwise.
      // For the same reason, we need to skip create(Iterable, Class).
      private static class EnumMultisetFactory {
        @Keep // used reflectively by testEquals
        public static <E extends Enum<E>> EnumMultiset<E> create(Iterable<E> elements) {
          return EnumMultiset.create(elements);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 6K bytes
    - Viewed (0)
Back to top