Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for TestReadBytes (3.47 sec)

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

        assertEquals("blah", Files.getNameWithoutExtension("/foo.bar/blah"));
        assertEquals("blah", Files.getNameWithoutExtension("/foo/.bar/blah"));
      }
    
      public void testReadBytes() throws IOException {
        ByteProcessor<byte[]> processor =
            new ByteProcessor<byte[]>() {
              private final ByteArrayOutputStream out = new ByteArrayOutputStream();
    
              @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.2K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/FilesTest.java

        assertEquals("blah", Files.getNameWithoutExtension("/foo.bar/blah"));
        assertEquals("blah", Files.getNameWithoutExtension("/foo/.bar/blah"));
      }
    
      public void testReadBytes() throws IOException {
        ByteProcessor<byte[]> processor =
            new ByteProcessor<byte[]>() {
              private final ByteArrayOutputStream out = new ByteArrayOutputStream();
    
              @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/ByteStreamsTest.java

          super(in);
          this.max = max;
        }
    
        @Override
        public long skip(long n) throws IOException {
          return super.skip(Math.min(max, n));
        }
      }
    
      public void testReadBytes() throws IOException {
        final byte[] array = newPreFilledByteArray(1000);
        assertThat(ByteStreams.readBytes(new ByteArrayInputStream(array), new TestByteProcessor()))
            .isEqualTo(array);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

          super(in);
          this.max = max;
        }
    
        @Override
        public long skip(long n) throws IOException {
          return super.skip(Math.min(max, n));
        }
      }
    
      public void testReadBytes() throws IOException {
        final byte[] array = newPreFilledByteArray(1000);
        assertThat(ByteStreams.readBytes(new ByteArrayInputStream(array), new TestByteProcessor()))
            .isEqualTo(array);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  5. src/bytes/buffer_test.go

    	{"foo\nbar", 0, []string{"foo\nbar"}, io.EOF},
    	{"alpha\nbeta\ngamma\n", '\n', []string{"alpha\n", "beta\n", "gamma\n"}, nil},
    	{"alpha\nbeta\ngamma", '\n', []string{"alpha\n", "beta\n", "gamma"}, io.EOF},
    }
    
    func TestReadBytes(t *testing.T) {
    	for _, test := range readBytesTests {
    		buf := NewBufferString(test.buffer)
    		var err error
    		for _, expected := range test.expected {
    			var bytes []byte
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
Back to top