Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 139 for fake (0.18 sec)

  1. guava-tests/test/com/google/common/io/MoreFilesTest.java

        MoreFiles.touch(temp);
        assertThat(Files.getLastModifiedTime(temp).toMillis()).isNotEqualTo(0);
      }
    
      public void testCreateParentDirectories_root() throws IOException {
        // We use a fake filesystem to sidestep flaky problems with Windows (b/136041958).
        try (FileSystem fs = Jimfs.newFileSystem(Configuration.unix())) {
          Path root = fs.getRootDirectories().iterator().next();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Jan 29 22:57:05 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        Runnable runMe =
            new Runnable() {
              @Override
              public void run() {
                numCalls.incrementAndGet();
                throw new RuntimeException("FAKE EXCEPTION!");
              }
            };
    
        e.execute(runMe);
        e.execute(runMe);
        fakePool.runAll();
    
        assertEquals(2, numCalls.get());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/RegularImmutableList.java

        return size;
      }
    
      @Override
      int copyIntoArray(@Nullable Object[] dst, int dstOff) {
        System.arraycopy(array, 0, dst, dstOff, size);
        return dstOff + size;
      }
    
      // The fake cast to E is safe because the creation methods only allow E's
      @Override
      @SuppressWarnings("unchecked")
      public E get(int index) {
        checkElementIndex(index, size);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Nov 30 21:54:06 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  4. guava/src/com/google/common/base/Stopwatch.java

     * that is already in the desired state.
     *
     * <p>When testing code that uses this class, use {@link #createUnstarted(Ticker)} or {@link
     * #createStarted(Ticker)} to supply a fake or mock ticker. This allows you to simulate any valid
     * behavior of the stopwatch.
     *
     * <p><b>Note:</b> This class is not thread-safe.
     *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 23 15:09:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        Runnable runMe =
            new Runnable() {
              @Override
              public void run() {
                numCalls.incrementAndGet();
                throw new RuntimeException("FAKE EXCEPTION!");
              }
            };
    
        e.execute(runMe);
        e.execute(runMe);
        fakePool.runAll();
    
        assertEquals(2, numCalls.get());
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

                int behavior = random.nextInt(4);
                if (behavior == 0) { // throw an exception
                  exceptionCount.incrementAndGet();
                  throw new RuntimeException("fake exception for test");
                } else if (behavior == 1) { // return null
                  computeNullCount.incrementAndGet();
                  return null;
                } else if (behavior == 2) { // slight delay before returning
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 25.5K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/base/Stopwatch.java

     * that is already in the desired state.
     *
     * <p>When testing code that uses this class, use {@link #createUnstarted(Ticker)} or {@link
     * #createStarted(Ticker)} to supply a fake or mock ticker. This allows you to simulate any valid
     * behavior of the stopwatch.
     *
     * <p><b>Note:</b> This class is not thread-safe.
     *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Nov 15 21:38:09 GMT 2022
    - 8.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/base/Converter.java

         * Given that we declare this method as accepting and returning non-nullable values (because we
         * implement Function<A, B>, as discussed in a class-level comment), it would make some sense to
         * perform runtime null checks on the input and output. (That would also make NullPointerTester
         * happy!) However, since we didn't do that for many years, we're not about to start now.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 23K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/OrderingTest.java

          list.add(i);
        }
    
        Ordering<Object> arbitrary =
            new ArbitraryOrdering() {
              @Override
              int identityHashCode(Object object) {
                return ((Integer) object) % 5; // fake tons of collisions!
              }
            };
    
        // Don't let the elements be in such a predictable order
        list = shuffledCopy(list, new Random(1));
    
        Collections.sort(list, arbitrary);
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 42.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/OrderingTest.java

          list.add(i);
        }
    
        Ordering<Object> arbitrary =
            new ArbitraryOrdering() {
              @Override
              int identityHashCode(Object object) {
                return ((Integer) object) % 5; // fake tons of collisions!
              }
            };
    
        // Don't let the elements be in such a predictable order
        list = shuffledCopy(list, new Random(1));
    
        Collections.sort(list, arbitrary);
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 42.5K bytes
    - Viewed (0)
Back to top