-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathassert_true_test.go
More file actions
39 lines (30 loc) · 799 Bytes
/
Copy pathassert_true_test.go
File metadata and controls
39 lines (30 loc) · 799 Bytes
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
package goassert
import "testing"
func Test_TrueShouldPass_GivenFalseAssertion(t *testing.T) {
tester := new(testing.T)
True(tester, true)
if tester.Failed() {
t.Error("True did not pass given true assertion")
}
}
func Test_TrueShouldFail_GivenFalseAssertion(t *testing.T) {
tester := new(testing.T)
True(tester, false)
if !tester.Failed() {
t.Error("True did not fail given false assertion")
}
}
func Test_FalseShouldPass_GivenFalseAssertion(t *testing.T) {
tester := new(testing.T)
False(tester, false)
if tester.Failed() {
t.Error("False did not pass given false assertion")
}
}
func Test_FalseShouldFail_GivenFalseAssertion(t *testing.T) {
tester := new(testing.T)
False(tester, true)
if !tester.Failed() {
t.Error("False did not fail given true assertion")
}
}