reflect: typo in uint test
Этот коммит содержится в:
родитель
6b73b5e486
коммит
f239e8e2d9
1 изменённых файлов: 2 добавлений и 2 удалений
|
@ -577,14 +577,14 @@ func TestConvert(t *testing.T) {
|
|||
c := v.Convert(TypeOf(byte(0)))
|
||||
|
||||
if c.Type().Kind() != Uint8 || c.Uint() != 3 {
|
||||
t.Errorf("Conver(uint64 -> byte failed: kind=%v, value=%d", c.Type().Kind().String(), c.Uint())
|
||||
t.Errorf("Convert(uint64 -> byte failed: kind=%v, value=%d", c.Type().Kind().String(), c.Uint())
|
||||
}
|
||||
|
||||
v = ValueOf("hello")
|
||||
c = v.Convert(TypeOf([]byte("")))
|
||||
|
||||
if c.Type().Kind() != Slice || c.Type().Elem().Kind() != Uint8 && c.Len() != 5 && string(c.Bytes()) != "hello" {
|
||||
t.Errorf("Conver(string -> []byte")
|
||||
t.Errorf("Convert(string -> []byte")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче