You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
v2ray-core/testing/assert/subject.go

23 lines
464 B

package assert
type Subject struct {
9 years ago
disp string
a *Assert
}
9 years ago
func (subject *Subject) Fail(verb string, other string) {
subject.FailWithMessage("Not true that " + subject.DisplayString() + " " + verb + " <" + other + ">.")
}
func (subject *Subject) FailWithMessage(message string) {
9 years ago
subject.a.Fail(message)
}
9 years ago
func (subject *Subject) DisplayString() string {
value := subject.disp
if len(value) == 0 {
value = "unknown"
}
9 years ago
return "<" + value + ">"
}