From cf22c432383b4eb2d4569fbdc158d3d4e741e1f0 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 24 Mar 2015 12:26:22 +1100 Subject: [PATCH] Removed redundant checks that don't work for all error types. --- samples/flushfs/flush_fs_test.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/samples/flushfs/flush_fs_test.go b/samples/flushfs/flush_fs_test.go index e4e30eb..4eab497 100644 --- a/samples/flushfs/flush_fs_test.go +++ b/samples/flushfs/flush_fs_test.go @@ -704,7 +704,6 @@ func (t *FlushErrorTest) Close() { err = t.f1.Close() t.f1 = nil - AssertNe(nil, err) ExpectThat(err, Error(HasSubstr("no such file"))) } @@ -732,7 +731,6 @@ func (t *FlushErrorTest) Dup() { if runtime.GOOS == "darwin" { AssertEq(nil, err) } else { - AssertNe(nil, err) ExpectThat(err, Error(HasSubstr("no such file"))) } @@ -740,7 +738,6 @@ func (t *FlushErrorTest) Dup() { err = t.f2.Close() t.f2 = nil - AssertNe(nil, err) ExpectThat(err, Error(HasSubstr("no such file"))) } @@ -786,7 +783,6 @@ func (t *FsyncErrorTest) Fsync() { // Fsync. err = t.f1.Sync() - AssertNe(nil, err) ExpectThat(err, Error(HasSubstr("no such file"))) } @@ -800,6 +796,5 @@ func (t *FsyncErrorTest) Fdatasync() { // Fdatasync. err = syscall.Fdatasync(int(t.f1.Fd())) - AssertNe(nil, err) ExpectThat(err, Error(HasSubstr("no such file"))) }