diff options
| -rw-r--r-- | hamlet_test.go | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/hamlet_test.go b/hamlet_test.go index d216617..cdbae0d 100644 --- a/hamlet_test.go +++ b/hamlet_test.go @@ -1,14 +1,20 @@ package hamlet import ( - "fmt" "testing" ) func TestAssertion(t *testing.T) { - prop1 := New(4) - prop2 := New("") + p := New("") + q := New(4) - fmt.Println(If(prop2, prop1)) - fmt.Println(If(prop1, prop2)) + theorem1 := If(p, q) + if v := theorem1.Value(); !v { + t.Errorf("want %t, got %t", true, false) + } + + theorem2 := If(q, p) + if v := theorem2.Value(); v { + t.Errorf("want %t, got %t", false, true) + } } |
