func (this *Assert) Bytes(value []byte) *BytesSubject { return &BytesSubject{ Subject: Subject{ disp: serial.BytesToHexString(value), a: this, }, value: value, } }
func InterfaceToString(value interface{}) string { if value == nil { return " " } switch value := value.(type) { case string: return value case *string: return *value case fmt.Stringer: return value.String() case error: return value.Error() case []byte: return serial.BytesToHexString(value) default: return fmt.Sprint(value) } }
func (subject *BytesSubject) NotEquals(expectation []byte) { if bytes.Equal(subject.value, expectation) { subject.Fail("is not equal to", serial.BytesToHexString(expectation)) } }