Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestRingBuffer_ByteInterface (0.27 sec)

  1. internal/ringbuffer/ring_buffer_test.go

    	}
    	if readHash.Sum32() != wroteHash.Sum32() {
    		t.Fatalf("expect read hash 0x%08x but got 0x%08x", readHash.Sum32(), wroteHash.Sum32())
    	}
    }
    
    func TestRingBuffer_ByteInterface(t *testing.T) {
    	defer timeout(5 * time.Second)()
    	rb := New(2)
    
    	// write one
    	err := rb.WriteByte('a')
    	if err != nil {
    		t.Fatalf("WriteByte failed: %v", err)
    	}
    	if rb.Length() != 1 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 26.8K bytes
    - Viewed (0)
Back to top