Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 944 for cassert (0.14 sec)

  1. android/guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java

        // Escapers operate on characters: no characters, no escaping.
        Assert.assertEquals("", escaper.escape(""));
        // Assert that escapers throw null pointer exceptions.
        try {
          escaper.escape((String) null);
          Assert.fail("exception not thrown when escaping a null string");
        } catch (NullPointerException e) {
          // pass
        }
      }
    
      /**
       * Asserts that an escaper escapes the given character into the expected string.
    Registered: 2025-05-30 12:43
    - Last Modified: 2022-01-18 20:55
    - 3.8K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java

        // Escapers operate on characters: no characters, no escaping.
        Assert.assertEquals("", escaper.escape(""));
        // Assert that escapers throw null pointer exceptions.
        try {
          escaper.escape((String) null);
          Assert.fail("exception not thrown when escaping a null string");
        } catch (NullPointerException e) {
          // pass
        }
      }
    
      /**
       * Asserts that an escaper escapes the given character into the expected string.
    Registered: 2025-05-30 12:43
    - Last Modified: 2022-01-18 20:55
    - 3.8K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

        // Verify that the listener executed in a reasonable amount of time.
        Assert.assertTrue(countDownLatch.await(1L, SECONDS));
    
        try {
          future.get();
          Assert.fail("This call was supposed to throw an ExecutionException");
        } catch (ExecutionException expected) {
          Assert.assertSame(expectedCause, expected.getCause());
        }
      }
    
      public void assertTimeout() throws Exception {
    Registered: 2025-05-30 12:43
    - Last Modified: 2023-05-12 18:12
    - 3K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

        // Verify that the listener executed in a reasonable amount of time.
        Assert.assertTrue(countDownLatch.await(1L, SECONDS));
    
        try {
          future.get();
          Assert.fail("This call was supposed to throw an ExecutionException");
        } catch (ExecutionException expected) {
          Assert.assertSame(expectedCause, expected.getCause());
        }
      }
    
      public void assertTimeout() throws Exception {
    Registered: 2025-05-30 12:43
    - Last Modified: 2023-05-12 18:12
    - 3K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/RecordedResponse.kt

     * limitations under the License.
     */
    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.contains
    import assertk.assertions.containsExactly
    import assertk.assertions.isBetween
    import assertk.assertions.isEqualTo
    import assertk.assertions.isFalse
    import assertk.assertions.isNotNull
    import assertk.assertions.isNull
    import assertk.assertions.isTrue
    import java.io.IOException
    import java.text.SimpleDateFormat
    Registered: 2025-05-30 11:42
    - Last Modified: 2024-12-27 13:39
    - 5.3K bytes
    - Viewed (0)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.isCloseTo
    import assertk.assertions.isFalse
    import assertk.assertions.isInstanceOf
    import assertk.assertions.matchesPredicate
    import java.util.Deque
    import java.util.concurrent.ConcurrentLinkedDeque
    import java.util.concurrent.TimeUnit
    Registered: 2025-05-30 11:42
    - Last Modified: 2025-03-19 19:25
    - 5.6K bytes
    - Viewed (0)
  7. mockwebserver-junit4/src/test/java/mockwebserver3/junit4/MockWebServerRuleTest.kt

     * limitations under the License.
     */
    package mockwebserver3.junit4
    
    import assertk.assertThat
    import assertk.assertions.isTrue
    import java.net.ConnectException
    import java.util.concurrent.atomic.AtomicBoolean
    import org.junit.Assert.fail
    import org.junit.Test
    import org.junit.runner.Description
    import org.junit.runners.model.Statement
    
    class MockWebServerRuleTest {
    Registered: 2025-05-30 11:42
    - Last Modified: 2025-03-19 19:25
    - 1.6K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/Helpers.java

    import static java.util.Collections.singletonMap;
    import static java.util.Collections.sort;
    import static junit.framework.Assert.assertEquals;
    import static junit.framework.Assert.assertFalse;
    import static junit.framework.Assert.assertTrue;
    import static junit.framework.Assert.fail;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    Registered: 2025-05-30 12:43
    - Last Modified: 2025-05-14 19:40
    - 17.5K bytes
    - Viewed (0)
  9. android/guava-tests/benchmark/com/google/common/collect/MultisetIteratorBenchmark.java

          sizeRemaining -= count;
          hashMultiset.add(value, count);
          linkedHashMultiset.add(value, count);
          treeMultiset.add(value, count);
        }
    
        // TODO(kevinb): convert to assert once benchmark tests enable asserts by default
        Preconditions.checkState(hashMultiset.size() == size);
      }
    
      @Benchmark
      int hashMultiset(int reps) {
        int sum = 0;
        for (int i = 0; i < reps; i++) {
    Registered: 2025-05-30 12:43
    - Last Modified: 2024-12-19 18:03
    - 2.7K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/LockHeldAssertingSet.java

    import static com.google.common.base.Preconditions.checkNotNull;
    import static junit.framework.Assert.assertTrue;
    
    import java.io.Serializable;
    import java.util.Collection;
    import java.util.Set;
    import org.jspecify.annotations.NullUnmarked;
    import org.jspecify.annotations.Nullable;
    
    /**
     * {@link Set} implementation that asserts that a given lock is held whenever one of its methods is
     * called.
     */
    @NullUnmarked
    Registered: 2025-05-30 12:43
    - Last Modified: 2025-02-13 17:34
    - 4.3K bytes
    - Viewed (0)
Back to top