mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-19 03:54:01 +00:00
reflect: typo in uint test
This commit is contained in:
@@ -577,14 +577,14 @@ func TestConvert(t *testing.T) {
|
|||||||
c := v.Convert(TypeOf(byte(0)))
|
c := v.Convert(TypeOf(byte(0)))
|
||||||
|
|
||||||
if c.Type().Kind() != Uint8 || c.Uint() != 3 {
|
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")
|
v = ValueOf("hello")
|
||||||
c = v.Convert(TypeOf([]byte("")))
|
c = v.Convert(TypeOf([]byte("")))
|
||||||
|
|
||||||
if c.Type().Kind() != Slice || c.Type().Elem().Kind() != Uint8 && c.Len() != 5 && string(c.Bytes()) != "hello" {
|
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")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user