mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 22:50:50 +00:00
fix the conv test case
This commit is contained in:
parent
4823a0f114
commit
fda28fa2ff
15
cache/conv_test.go
vendored
15
cache/conv_test.go
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user