예제 #1
0
func (this *Assert) Int(value int) *IntSubject {
	return &IntSubject{
		Subject: Subject{
			a:    this,
			disp: serial.IntToString(value),
		},
		value: value,
	}
}
예제 #2
0
func (subject *IntSubject) GreaterThan(expectation int) {
	if subject.value <= expectation {
		subject.Fail("is greater than", serial.IntToString(expectation))
	}
}
예제 #3
0
func (subject *IntSubject) LessThan(expectation int) {
	if subject.value >= expectation {
		subject.Fail("is less than", serial.IntToString(expectation))
	}
}
예제 #4
0
func (subject *IntSubject) Equals(expectation int) {
	if subject.value != expectation {
		subject.Fail("is equal to", serial.IntToString(expectation))
	}
}