Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for nextInt (0.18 sec)

  1. guava-tests/test/com/google/common/graph/NetworkMutationTest.java

          assertThat(network.nodes()).isEmpty();
          assertThat(network.edges()).isEmpty();
          AbstractNetworkTest.validateNetwork(network);
    
          while (network.nodes().size() < NUM_NODES) {
            network.addNode(gen.nextInt(NODE_POOL_SIZE));
          }
          ArrayList<Integer> nodeList = new ArrayList<>(network.nodes());
          for (int i = 0; i < NUM_EDGES; ++i) {
            // Parallel edges are allowed, so this should always succeed.
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 10 19:42:18 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/AtomicLongMapTest.java

        assertEquals(-1L, map.get(key));
      }
    
      public void testAddAndGet() {
        AtomicLongMap<String> map = AtomicLongMap.create();
        String key = "key";
        long addend = random.nextInt(MAX_ADDEND);
        for (int i = 0; i < ITERATIONS; i++) {
          long before = map.get(key);
          long result = map.addAndGet(key, addend);
          long after = map.get(key);
          assertEquals(before + addend, after);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 17.4K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/graph/NetworkMutationTest.java

          assertThat(network.nodes()).isEmpty();
          assertThat(network.edges()).isEmpty();
          AbstractNetworkTest.validateNetwork(network);
    
          while (network.nodes().size() < NUM_NODES) {
            network.addNode(gen.nextInt(NODE_POOL_SIZE));
          }
          ArrayList<Integer> nodeList = new ArrayList<>(network.nodes());
          for (int i = 0; i < NUM_EDGES; ++i) {
            // Parallel edges are allowed, so this should always succeed.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 10 19:42:18 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        for (int i = 0; i < heapSize; i++) {
          mmHeap.add(random.nextInt());
        }
        for (int i = 0; i < numberOfModifications; i++) {
          mmHeap.removeAt(random.nextInt(mmHeap.size()));
          assertIntactUsingSeed(seed, mmHeap);
          mmHeap.add(random.nextInt());
          assertIntactUsingSeed(seed, mmHeap);
        }
      }
    
      public void testRemoveAt_exhaustive() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 36.1K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java

                    public Long call() {
                      long threadSum = 0;
                      for (int j = 0; j < getsPerTask; j++) {
                        long delta = random.nextInt(deltaRange);
                        int behavior = random.nextInt(10);
                        switch (behavior) {
                          case 0:
                            map.incrementAndGet(key);
                            threadSum++;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

      public void testDivideRemainderEuclideanProperty() {
        // Use a seed so that the test is deterministic:
        Random r = new Random(0L);
        for (int i = 0; i < 1000000; i++) {
          int dividend = r.nextInt();
          int divisor = r.nextInt();
          // Test that the Euclidean property is preserved:
          assertThat(
                  dividend
                      - (divisor * UnsignedInts.divide(dividend, divisor)
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/AtomicLongMapTest.java

        assertEquals(-1L, map.get(key));
      }
    
      public void testAddAndGet() {
        AtomicLongMap<String> map = AtomicLongMap.create();
        String key = "key";
        long addend = random.nextInt(MAX_ADDEND);
        for (int i = 0; i < ITERATIONS; i++) {
          long before = map.get(key);
          long result = map.addAndGet(key, addend);
          long after = map.get(key);
          assertEquals(before + addend, after);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 17.4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

          for (int trials = 10; trials-- > 0; ) {
            byte[] left = new byte[1 + rnd.nextInt(32)];
            rnd.nextBytes(left);
            byte[] right = left.clone();
            assertThat(comparator.compare(left, right)).isEqualTo(0);
            int i = rnd.nextInt(left.length);
            left[i] ^= (byte) (1 + rnd.nextInt(255));
            assertThat(comparator.compare(left, right)).isNotEqualTo(0);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

      public void testDivideRemainderEuclideanProperty() {
        // Use a seed so that the test is deterministic:
        Random r = new Random(0L);
        for (int i = 0; i < 1000000; i++) {
          int dividend = r.nextInt();
          int divisor = r.nextInt();
          // Test that the Euclidean property is preserved:
          assertThat(
                  dividend
                      - (divisor * UnsignedInts.divide(dividend, divisor)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 12.7K bytes
    - Viewed (1)
  10. guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java

                    public Long call() {
                      long threadSum = 0;
                      for (int j = 0; j < getsPerTask; j++) {
                        long delta = random.nextInt(deltaRange);
                        int behavior = random.nextInt(10);
                        switch (behavior) {
                          case 0:
                            map.incrementAndGet(key);
                            threadSum++;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 4.2K bytes
    - Viewed (0)
Back to top