summaryrefslogtreecommitdiff
path: root/tests/gobang.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gobang.go')
-rw-r--r--tests/gobang.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/gobang.go b/tests/gobang.go
index c862e82..64e9eb5 100644
--- a/tests/gobang.go
+++ b/tests/gobang.go
@@ -126,6 +126,17 @@ func test_SomeFnError() {
TAssertEqual(SomeFnError(fn, fn, fn, fn), errs[2])
TAssertEqual(i, 4)
})
+
+ Testing("no error if some function is nil", func() {
+ myErr := errors.New("the expected result")
+ TAssertEqual(SomeFnError(
+ func() error { return nil },
+ nil,
+ func() error { return nil },
+ func() error { return myErr },
+ func() error { return nil },
+ ), myErr)
+ })
}
func test_Random() {