1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 17:00:54 +00:00

fix the conv test case

This commit is contained in:
astaxie 2015-09-18 12:11:48 +08:00
parent 4823a0f114
commit fda28fa2ff

15
cache/conv_test.go vendored
View File

@ -130,21 +130,6 @@ func TestGetBool(t *testing.T) {
}
}
func TestGetByteArray(t *testing.T) {
var b = []byte("test")
var t1 = []byte("test")
if !byteArrayEquals(b, getByteArray(t1)) {
t.Error("get byte array from byte array error")
}
var t2 = "test"
if !byteArrayEquals(b, getByteArray(t2)) {
t.Error("get byte array from string error")
}
if nil != getByteArray(nil) {
t.Error("get byte array from nil error")
}
}
func byteArrayEquals(a []byte, b []byte) bool {
if len(a) != len(b) {
return false