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) } theorem3 := Xor(p, q) if !theorem3.Assert() { t.Errorf("want %t, got %t", true, false) } }