Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 383 for helper (0.18 sec)

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

     * });
     * }</pre>
     *
     * <p>Even if your non-test code does not use finalization, you can use this class to test for
     * leaks, by ensuring that objects are no longer strongly referenced:
     *
     * <pre>{@code
     * // Helper function keeps victim stack-unreachable.
     * private WeakReference<Foo> fooWeakRef() {
     *   Foo x = ....;
     *   WeakReference<Foo> weakRef = new WeakReference<>(x);
     *   // ... use x ...
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java

        try {
          cache.getUnchecked("bar");
          fail();
        } catch (UncheckedExecutionException expected) {
        }
        assertEquals(2, callCount.get());
      }
    
      /**
       * Test-helper method that performs {@code nThreads} concurrent calls to {@code cache.get(key)} or
       * {@code cache.getUnchecked(key)}, and returns a List containing each of the results. The result
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 86.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/xml/XmlEscapersTest.java

        // Test '\t', '\n' and '\r' are escaped.
        assertEquals("a&#x9;b&#xA;c&#xD;d", xmlAttributeEscaper.escape("a\tb\nc\rd"));
      }
    
      // Helper to assert common properties of xml escapers.
      static void assertBasicXmlEscaper(
          CharEscaper xmlEscaper, boolean shouldEscapeQuotes, boolean shouldEscapeWhitespaceChars) {
        // Simple examples (smoke tests)
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/base/Objects.java

    package com.google.common.base;
    
    import com.google.common.annotations.GwtCompatible;
    import java.util.Arrays;
    import javax.annotation.CheckForNull;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Helper functions that can operate on any {@code Object}.
     *
     * <p>See the Guava User Guide on <a
     * href="https://github.com/google/guava/wiki/CommonObjectUtilitiesExplained">writing {@code Object}
     * methods with {@code Objects}</a>.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/AbstractContainerTester.java

        List<E> expected = Helpers.copyToList(getSampleElements());
        expected.addAll(Arrays.asList(elements));
        expectContents(expected);
      }
    
      protected final void expectAdded(int index, E... elements) {
        expectAdded(index, Arrays.asList(elements));
      }
    
      protected final void expectAdded(int index, Collection<E> elements) {
        List<E> expected = Helpers.copyToList(getSampleElements());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/math/ToDoubleRounder.java

    import static com.google.common.math.MathPreconditions.checkRoundingUnnecessary;
    
    import com.google.common.annotations.GwtIncompatible;
    import java.math.RoundingMode;
    
    /**
     * Helper type to implement rounding {@code X} to a representable {@code double} value according to
     * a {@link RoundingMode}.
     */
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/math/StatsTesting.java

    import com.google.common.collect.Lists;
    import com.google.common.primitives.Doubles;
    import com.google.common.primitives.Ints;
    import java.math.BigInteger;
    import java.util.List;
    
    /**
     * Inputs, expected outputs, and helper methods for tests of {@link StatsAccumulator}, {@link
     * Stats}, {@link PairedStatsAccumulator}, and {@link PairedStats}.
     *
     * @author Pete Gillin
     */
    class StatsTesting {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 22.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/base/Utf8Test.java

        expected[119] = 1048576;
        expected[120] = 458752;
        expected[121] = 524288;
        expected[122] = 65536;
        // Anything not assigned was the default 0.
        return expected;
      }
    
      /**
       * Helper to run the loop to test all the permutations for the number of bytes specified.
       *
       * @param numBytes the number of bytes in the byte array
       * @param expectedCount the expected number of roundtrippable permutations
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/testing/RelationshipTester.java

    import com.google.common.collect.Lists;
    import com.google.errorprone.annotations.CanIgnoreReturnValue;
    import java.util.List;
    import junit.framework.AssertionFailedError;
    
    /**
     * Implementation helper for {@link EqualsTester} and {@link EquivalenceTester} that tests for
     * equivalence classes.
     *
     * @author Gregory Kick
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    final class RelationshipTester<T> {
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 25 11:57:12 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/xml/XmlEscapersTest.java

        // Test '\t', '\n' and '\r' are escaped.
        assertEquals("a&#x9;b&#xA;c&#xD;d", xmlAttributeEscaper.escape("a\tb\nc\rd"));
      }
    
      // Helper to assert common properties of xml escapers.
      static void assertBasicXmlEscaper(
          CharEscaper xmlEscaper, boolean shouldEscapeQuotes, boolean shouldEscapeWhitespaceChars) {
        // Simple examples (smoke tests)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Dec 16 19:54:45 GMT 2020
    - 4.7K bytes
    - Viewed (0)
Back to top