Sfoglia il codice sorgente

fix to gccgo compilation error
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>

vagrant 10 anni fa
parent
commit
d2a2c974d9
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. 1 2
      pkg/ioutils/readers_test.go

+ 1 - 2
pkg/ioutils/readers_test.go

@@ -43,10 +43,9 @@ func TestReaderErrWrapperReadOnError(t *testing.T) {
 }
 }
 
 
 func TestReaderErrWrapperRead(t *testing.T) {
 func TestReaderErrWrapperRead(t *testing.T) {
-	called := false
 	reader := strings.NewReader("a string reader.")
 	reader := strings.NewReader("a string reader.")
 	wrapper := NewReaderErrWrapper(reader, func() {
 	wrapper := NewReaderErrWrapper(reader, func() {
-		called = true // Should not be called
+		t.Fatalf("readErrWrapper should not have called the anonymous function on failure")
 	})
 	})
 	// Read 20 byte (should be ok with the string above)
 	// Read 20 byte (should be ok with the string above)
 	num, err := wrapper.Read(make([]byte, 20))
 	num, err := wrapper.Read(make([]byte, 20))