v2ray 10 年之前
父节点
当前提交
88d75fd1c0
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      testing/assert/boolsubject.go

+ 4 - 0
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)