From 607912892bc7f1dbbdf9a8a42bc91cdb9f480079 Mon Sep 17 00:00:00 2001 From: demo Date: Sat, 30 May 2026 11:19:45 -0400 Subject: style: rename Value to Assert --- hamlet.go | 2 +- hamlet_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hamlet.go b/hamlet.go index 1bdcc94..8b2a6b7 100644 --- a/hamlet.go +++ b/hamlet.go @@ -6,7 +6,7 @@ type Assertion struct { value bool } -func (a Assertion) Value() bool { +func (a Assertion) Assert() bool { return a.value } diff --git a/hamlet_test.go b/hamlet_test.go index cdbae0d..1a9df31 100644 --- a/hamlet_test.go +++ b/hamlet_test.go @@ -9,12 +9,12 @@ func TestAssertion(t *testing.T) { q := New(4) theorem1 := If(p, q) - if v := theorem1.Value(); !v { + if v := theorem1.Assert(); !v { t.Errorf("want %t, got %t", true, false) } theorem2 := If(q, p) - if v := theorem2.Value(); v { + if v := theorem2.Assert(); v { t.Errorf("want %t, got %t", false, true) } } -- cgit v1.2.3