Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 203 for teststring (0.14 sec)

  1. android/guava-tests/benchmark/com/google/common/base/WhitespaceMatcherBenchmark.java

        matcher = useNew ? CharMatcher.whitespace() : OLD_WHITESPACE;
        teststring = newTestString(new Random(1), bitSet, percentMatching);
      }
    
      @Benchmark
      public int countIn(int reps) {
        int result = 0;
        CharMatcher matcher = this.matcher;
        String teststring = this.teststring;
        for (int i = 0; i < reps; i++) {
          result += matcher.countIn(teststring);
        }
        return result;
      }
    
      @Benchmark
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  2. src/test/java/jcifs/pac/PacUnicodeStringTest.java

            PacUnicodeString pacString = new PacUnicodeString((short) 10, (short) 20, 100);
            String testString = "abcde";
    
            // The check method should return the same string instance
            String result = pacString.check(testString);
            assertSame(testString, result, "The check method should return the original string on success.");
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/base/AsciiBenchmark.java

        String string = noWorkToDo ? charSequenceToUpperCase(testString) : testString;
    
        int dummy = 0;
        for (int i = 0; i < reps; i++) {
          dummy += charSequenceToUpperCase(string).length();
        }
        return dummy;
      }
    
      @Benchmark
      int stringToUpperCase(int reps) {
        String string = noWorkToDo ? testString.toUpperCase(Locale.US) : testString;
    
        int dummy = 0;
        for (int i = 0; i < reps; i++) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/smb1/ServerMessageBlockTest.java

            smb.useUnicode = false;
            String testString = "Hello World";
            byte[] buffer = new byte[testString.length() + 1];
            int len = smb.writeString(testString, buffer, 0);
            assertEquals(testString.length() + 1, len);
            String readString = smb.readString(buffer, 0);
            assertEquals(testString, readString);
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/MultiReaderTest.java

        assertFalse(joinedReader.ready());
      }
    
      public void testSimple() throws Exception {
        String testString = "abcdefgh";
        CharSource source = newCharSource(testString);
        Reader joinedReader = CharSource.concat(source, source).openStream();
    
        String expectedString = testString + testString;
        assertEquals(expectedString, CharStreams.toString(joinedReader));
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 3.7K bytes
    - Viewed (0)
  6. src/test/java/jcifs/util/EncdecTest.java

            // Given
            String testString = "Hello";
            byte[] buffer = new byte[testString.length()];
    
            // When - Manual string encoding using individual bytes
            byte[] strBytes = testString.getBytes();
            System.arraycopy(strBytes, 0, buffer, 0, strBytes.length);
    
            // Then
            String decoded = new String(buffer);
            assertEquals(testString, decoded);
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb1/ServerMessageBlockTest.java

                testBlock.setUseUnicode(true);
                byte[] buffer = new byte[100];
                String testString = "Test";
    
                int bytesWritten = testBlock.writeString(testString, buffer, 10);
    
                // Unicode strings are written as UTF-16LE with null terminator
                assertTrue(bytesWritten > testString.length());
                // First byte should be 'T' in UTF-16LE (0x54)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 36.2K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb1/net/NetShareEnumResponseTest.java

        }
    
        @Test
        @DisplayName("Test readString with ASCII encoding")
        void testReadStringAscii() throws Exception {
            String testString = "TestString";
            byte[] buffer = new byte[128];
            byte[] stringBytes = testString.getBytes(StandardCharsets.US_ASCII);
            System.arraycopy(stringBytes, 0, buffer, 10, stringBytes.length);
            buffer[10 + stringBytes.length] = 0; // null terminator
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.2K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/base/AsciiBenchmark.java

        String string = noWorkToDo ? charSequenceToUpperCase(testString) : testString;
    
        int dummy = 0;
        for (int i = 0; i < reps; i++) {
          dummy += charSequenceToUpperCase(string).length();
        }
        return dummy;
      }
    
      @Benchmark
      int stringToUpperCase(int reps) {
        String string = noWorkToDo ? testString.toUpperCase(Locale.US) : testString;
    
        int dummy = 0;
        for (int i = 0; i < reps; i++) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  10. src/test/java/jcifs/pac/PacLogonInfoTest.java

            String testString = "TEST";
            short length = (short) (testString.length() * 2); // Unicode length
            PacUnicodeString unicodeString = new PacUnicodeString(length, length, 100);
    
            // Should validate string length
            String result = unicodeString.check(testString);
            assertEquals(testString, result);
    
            // Should reject wrong length
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.3K bytes
    - Viewed (0)
Back to top