示例#1
0
文件: byte.go 项目: v2ray/v2ray-core
func (v *Assert) Byte(value byte) *ByteSubject {
	return &ByteSubject{
		Subject: Subject{
			disp: serial.ByteToHexString(value),
			a:    v,
		},
		value: value,
	}
}
示例#2
0
文件: byte.go 项目: v2ray/v2ray-core
func (subject *ByteSubject) GreaterThan(expectation byte) {
	if subject.value <= expectation {
		subject.Fail("is greater than", serial.ByteToHexString(expectation))
	}
}
示例#3
0
文件: byte.go 项目: v2ray/v2ray-core
func (subject *ByteSubject) LessThan(expectation byte) {
	if subject.value >= expectation {
		subject.Fail("is less than", serial.ByteToHexString(expectation))
	}
}
示例#4
0
文件: byte.go 项目: v2ray/v2ray-core
func (subject *ByteSubject) Equals(expectation byte) {
	if subject.value != expectation {
		subject.Fail("is equal to", serial.ByteToHexString(expectation))
	}
}