Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 4 of 4 for TestReadBytes (0.07 seconds)

  1. 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 {
        byte[] array = newPreFilledByteArray(1000);
        assertThat(ByteStreams.readBytes(new ByteArrayInputStream(array), new TestByteProcessor()))
            .isEqualTo(array);
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 19:26:39 GMT 2026
    - 22K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/io/FilesTest.java

        assertThat(Files.getNameWithoutExtension("/foo.bar/blah")).isEqualTo("blah");
        assertThat(Files.getNameWithoutExtension("/foo/.bar/blah")).isEqualTo("blah");
      }
    
      public void testReadBytes() throws IOException {
        ByteProcessor<byte[]> processor =
            new ByteProcessor<byte[]>() {
              private final ByteArrayOutputStream out = new ByteArrayOutputStream();
    
              @Override
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 19 18:53:45 GMT 2026
    - 22.8K bytes
    - Click Count (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 {
        byte[] array = newPreFilledByteArray(1000);
        assertThat(ByteStreams.readBytes(new ByteArrayInputStream(array), new TestByteProcessor()))
            .isEqualTo(array);
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 19:26:39 GMT 2026
    - 22K bytes
    - Click Count (0)
  4. 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
    Created: Tue Apr 07 11:13:11 GMT 2026
    - Last Modified: Fri Nov 14 19:01:17 GMT 2025
    - 19.4K bytes
    - Click Count (0)
Back to Top