summaryrefslogtreecommitdiff
path: root/hamlet_test.go
blob: 1a9df31b5178b59e31c52b02cf3575b0bd042844 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package hamlet

import (
	"testing"
)

func TestAssertion(t *testing.T) {
	p := New("")
	q := New(4)

	theorem1 := If(p, q)
	if v := theorem1.Assert(); !v {
		t.Errorf("want %t, got %t", true, false)
	}

	theorem2 := If(q, p)
	if v := theorem2.Assert(); v {
		t.Errorf("want %t, got %t", false, true)
	}
}