소스 검색

Fix BenchmarkExtendMatch to honor the testdata flag.

Nigel Tao 9 년 전
부모
커밋
d6668316e4
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      snappy_test.go

+ 2 - 1
snappy_test.go

@@ -1306,7 +1306,8 @@ func Benchmark_ZFlat10(b *testing.B) { benchFile(b, 10, false) }
 func Benchmark_ZFlat11(b *testing.B) { benchFile(b, 11, false) }
 
 func BenchmarkExtendMatch(b *testing.B) {
-	src, err := ioutil.ReadFile(goldenText)
+	tDir := filepath.FromSlash(*testdataDir)
+	src, err := ioutil.ReadFile(filepath.Join(tDir, goldenText))
 	if err != nil {
 		b.Fatalf("ReadFile: %v", err)
 	}