-
Notifications
You must be signed in to change notification settings - Fork 6
/
bool_test.go
43 lines (37 loc) · 1.13 KB
/
bool_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package assert
import "testing"
func TestThatBoolIsFalseHasNoErrors(t *testing.T) {
assert, mockT := setupWithMockT(t)
assert.ThatBool(false).IsFalse().IsFalse()
mockT.HasNoErrors()
}
func TestThatBoolIsFalseHasErrorMessages(t *testing.T) {
assert, mockT := setupWithMockT(t)
assert.ThatBool(true).IsFalse().IsFalse()
mockT.HasErrorMessages(
"Expected <false>, but was <true>.",
"Expected <false>, but was <true>.",
)
}
func TestThatBoolIsTrueHasNoErrors(t *testing.T) {
assert, mockT := setupWithMockT(t)
assert.ThatBool(true).IsTrue().IsTrue()
mockT.HasNoErrors()
}
func TestThatBoolIsTrueHasErrorMessages(t *testing.T) {
assert, mockT := setupWithMockT(t)
assert.ThatBool(false).IsTrue().IsTrue()
mockT.HasErrorMessages(
"Expected <true>, but was <false>.",
"Expected <true>, but was <false>.",
)
}
func TestThatBoolIsSchrödingersCatHasErrorMessages(t *testing.T) {
assert, mockT := setupWithMockT(t)
assert.ThatBool(false).IsSchrödingersCat()
assert.ThatBool(true).IsSchrödingersCat()
mockT.HasErrorMessages(
"Expected Schrödinger's cat, but was <false>.",
"Expected Schrödinger's cat, but was <true>.",
)
}