Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for nextBytes (0.56 sec)

  1. android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

        Random rnd = new Random(714958103);
        for (int trial = 0; trial < 100; trial++) {
          byte[] left = new byte[1 + rnd.nextInt(32)];
          rnd.nextBytes(left);
          byte[] right = left.clone();
          assertThat(comparator1.compare(left, right)).isEqualTo(0);
          assertThat(comparator2.compare(left, right)).isEqualTo(0);
          int i = rnd.nextInt(left.length);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 13.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/primitives/IntsTest.java

        // total overkill, but, it takes 0.1 sec so why not...
        for (int i = 0; i < 10000; i++) {
          int num = r.nextInt();
          assertThat(Ints.fromByteArray(Ints.toByteArray(num))).isEqualTo(num);
    
          r.nextBytes(b);
          assertThat(Ints.toByteArray(Ints.fromByteArray(b))).isEqualTo(b);
        }
      }
    
      public void testEnsureCapacity() {
        assertThat(Ints.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 29.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/primitives/ShortsTest.java

        for (int i = 0; i < 10000; i++) {
          short num = (short) r.nextInt();
          assertThat(Shorts.fromByteArray(Shorts.toByteArray(num))).isEqualTo(num);
    
          r.nextBytes(b);
          assertThat(Shorts.toByteArray(Shorts.fromByteArray(b))).isEqualTo(b);
        }
      }
    
      public void testEnsureCapacity() {
        assertThat(Shorts.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 27.5K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/core/misc/Base64UtilTest.java

         */
        public void testEncodeDecode_RoundTrip() throws Exception {
            // Test with ASCII text
            final String text = "Hello, World!";
            final byte[] textBytes = text.getBytes("UTF-8");
            final String encoded = Base64Util.encode(textBytes);
            final byte[] decoded = Base64Util.decode(encoded);
            assertEquals("Round trip should preserve data", text, new String(decoded, "UTF-8"));
    
    Registered: Sat Dec 20 08:55:33 UTC 2025
    - Last Modified: Sat Nov 22 11:21:59 UTC 2025
    - 6K bytes
    - Viewed (0)
Back to top