summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/matrix/concurrency_test.go2
-rw-r--r--tests/test_helpers/helpers.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/matrix/concurrency_test.go b/tests/matrix/concurrency_test.go
index 6a9b9aa..1afd33d 100644
--- a/tests/matrix/concurrency_test.go
+++ b/tests/matrix/concurrency_test.go
@@ -118,7 +118,7 @@ func TestConcurrentReadCreate(t *testing.T) {
log.Fatal(err)
}
buf := buf0[:n]
- if bytes.Compare(buf, content) != 0 {
+ if !bytes.Equal(buf, content) {
// Calling t.Fatal() from a goroutine hangs the test so we use log.Fatal
log.Fatalf("%s: content mismatch: have=%q want=%q", t.Name(), string(buf), string(content))
}
diff --git a/tests/test_helpers/helpers.go b/tests/test_helpers/helpers.go
index 5bc1298..2a0feb8 100644
--- a/tests/test_helpers/helpers.go
+++ b/tests/test_helpers/helpers.go
@@ -335,7 +335,7 @@ func VerifyExistence(t *testing.T, path string) bool {
dir := filepath.Dir(path)
name := filepath.Base(path)
d, err := os.Open(dir)
- if err != nil && open == true {
+ if err != nil && open {
t.Errorf("VerifyExistence: we can open the file but not the parent dir!? err=%v", err)
} else if err == nil {
defer d.Close()