From 88d75fd1c0f6005f1aa6993dc1559bfd0f48e1a2 Mon Sep 17 00:00:00 2001 From: v2ray Date: Thu, 3 Dec 2015 15:18:43 +0100 Subject: [PATCH] doc --- testing/assert/boolsubject.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testing/assert/boolsubject.go b/testing/assert/boolsubject.go index aaed7eba..0eed2bcb 100644 --- a/testing/assert/boolsubject.go +++ b/testing/assert/boolsubject.go @@ -4,6 +4,7 @@ import ( "strconv" ) +// Assert on a boolean variable. func Bool(value bool) *BoolSubject { return &BoolSubject{value: value} } @@ -26,18 +27,21 @@ func (subject *BoolSubject) DisplayString() string { return subject.Subject.DisplayString(strconv.FormatBool(subject.value)) } +// to be equal to another boolean variable. func (subject *BoolSubject) Equals(expectation bool) { if subject.value != expectation { subject.Fail("is equal to", expectation) } } +// to be true. func (subject *BoolSubject) IsTrue() { if subject.value != true { subject.Fail("is", true) } } +// to be false. func (subject *BoolSubject) IsFalse() { if subject.value != false { subject.Fail("is", false)