Browse Source

reflect: typo in uint test

pull/3609/head
Damian Gryski 2 years ago
committed by Ayke
parent
commit
f239e8e2d9
  1. 4
      src/reflect/value_test.go

4
src/reflect/value_test.go

@ -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")
}
}

Loading…
Cancel
Save