aboutsummaryrefslogtreecommitdiffstats
path: root/check
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2024-02-19 09:09:57 -0500
committerEugene Triguba <eugenetriguba@gmail.com>2024-02-19 09:10:11 -0500
commit328d6e27346a5c4354721f086fecc17fe66cc92e (patch)
tree20fb3010bfa170a87f275ae115a8a3502d84a3d8 /check
parentRelease v0.3.1 (diff)
downloadcheckmate-328d6e27346a5c4354721f086fecc17fe66cc92e.zip
Fix error message with Equal
Diffstat (limited to 'check')
-rw-r--r--check/check.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/check/check.go b/check/check.go
index ffc4bb5..486d7cf 100644
--- a/check/check.go
+++ b/check/check.go
@@ -44,7 +44,7 @@ func NotNil(t checkmate.TestingT, value any, msgAndArgs ...any) bool {
}
if len(msgAndArgs) == 0 {
- msgAndArgs = []any{"expected value to not be nil, got nil", value}
+ msgAndArgs = []any{"expected value to not be nil, got nil"}
}
return check(t, value != nil, msgAndArgs...)
@@ -166,7 +166,7 @@ func Equal(t checkmate.TestingT, actual, expected any, msgAndArgs ...any) bool {
}
if len(msgAndArgs) == 0 {
- msgAndArgs = []any{"expected %v to equal %v", expected, actual}
+ msgAndArgs = []any{"expected %v to equal %v", actual, expected}
}
return check(t, actual == expected, msgAndArgs...)