Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 120 for assertLen (0.07 sec)

  1. guava-testlib/test/com/google/common/testing/SerializableTesterTest.java

          @Override
          public int hashCode() {
            return 1;
          }
        }
      }
    
      private static void assertContains(String expectedSubstring, String actual) {
        // TODO(kevinb): use a Truth assertion here
        if (!actual.contains(expectedSubstring)) {
          fail("expected <" + actual + "> to contain <" + expectedSubstring + ">");
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 17 15:49:06 UTC 2023
    - 4K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java

       * the call to {@code contains(null)} is permitted to throw a {@code NullPointerException}.
       *
       * @param message message to use upon assertion failure
       */
      protected void expectNullKeyMissingWhenNullKeysUnsupported(String message) {
        try {
          assertFalse(message, getMap().containsKey(null));
        } catch (NullPointerException tolerated) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/BaseEncodingTest.java

        // We use this somewhat weird pattern with an enum for each assertion we want to make as a way
        // of dealing with the fact that one of the assertions is @GwtIncompatible but we don't want to
        // have to have duplicate @GwtIncompatible test methods just to make that assertion.
        for (AssertFailsToDecodeStrategy strategy : AssertFailsToDecodeStrategy.values()) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 16:27:30 UTC 2024
    - 24.6K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/google/SetMultimapPutTester.java

          V v = entry.getValue();
    
          Set<V> values = multimap().get(k);
          Set<V> expectedValues = copyToSet(values);
    
          assertFalse(multimap().put(k, v));
          assertEquals(expectedValues, values);
          assertGet(k, expectedValues);
        }
      }
    
      @MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_VALUES})
      @CollectionSize.Require(absent = ZERO)
      public void testPutDuplicateValue_null() {
        initMultimapWithNullValue();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/google/MultimapAsMapTester.java

      }
    
      @CollectionSize.Require(absent = ZERO)
      @MapFeature.Require(SUPPORTS_REMOVE)
      public void testAsMapRemove() {
        assertContentsInOrder(multimap().asMap().remove(k0()), v0());
        assertGet(k0());
        assertEquals(getNumElements() - 1, multimap().size());
      }
    
      @CollectionSize.Require(SEVERAL)
      @MapFeature.Require(SUPPORTS_PUT)
      public void testAsMapEntrySetReflectsPutSameKey() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapClearTester.java

        assertEmpty(multimap().asMap());
        assertEmpty(multimap().keySet());
        assertEmpty(multimap().keys());
        assertEmpty(multimap().values());
        for (K key : sampleKeys()) {
          assertGet(key);
        }
      }
    
      @MapFeature.Require(SUPPORTS_REMOVE)
      public void testClear() {
        multimap().clear();
        assertCleared();
      }
    
      @MapFeature.Require(SUPPORTS_REMOVE)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 19:10:20 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  7. guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java

        }
      }
    
      /** Returns the product of {@code n1} exclusive through {@code n2} inclusive. */
      @SuppressWarnings("UseCorrectAssertInTests") // TODO(b/345814817): Remove or convert assertion.
      private static BigInteger oldSlowFactorial(int n1, int n2) {
        assert n1 <= n2;
        if (IntMath.log2(n2, CEILING) * (n2 - n1) < Long.SIZE - 1) {
          // the result will definitely fit into a long
          long result = 1;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Aug 19 16:21:24 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/ws/WebSocketRecorder.kt

        code: Int,
        reason: String,
      ) {
        assertThat(nextEvent()).isEqualTo(Closed(code, reason))
      }
    
      fun assertExhausted() {
        assertThat(events).isEmpty()
      }
    
      fun assertOpen(): WebSocket {
        val event = nextEvent() as Open
        return event.webSocket
      }
    
      fun assertFailure(t: Throwable?) {
        val event = nextEvent() as Failure
        assertThat(event.response).isNull()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapAsMapTester.java

      }
    
      @CollectionSize.Require(absent = ZERO)
      @MapFeature.Require(SUPPORTS_REMOVE)
      public void testAsMapRemove() {
        assertContentsInOrder(multimap().asMap().remove(k0()), v0());
        assertGet(k0());
        assertEquals(getNumElements() - 1, multimap().size());
      }
    
      @CollectionSize.Require(SEVERAL)
      @MapFeature.Require(SUPPORTS_PUT)
      public void testAsMapEntrySetReflectsPutSameKey() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  10. tests/embedded_struct_test.go

    }
    
    func (c *Content) Scan(src interface{}) error {
    	var value Content
    	str, ok := src.(string)
    	if !ok {
    		byt, ok := src.([]byte)
    		if !ok {
    			return errors.New("Embedded.Scan byte assertion failed")
    		}
    		if err := json.Unmarshal(byt, &value); err != nil {
    			return err
    		}
    	} else {
    		if err := json.Unmarshal([]byte(str), &value); err != nil {
    			return err
    		}
    	}
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 7.3K bytes
    - Viewed (0)
Back to top