mirror of
https://github.com/golang/go
synced 2024-11-26 08:17:59 -07:00
Verify that "byte" is an alias for "uint8".
R=r DELTA=6 (6 added, 0 deleted, 0 changed) OCL=26836 CL=26841
This commit is contained in:
parent
c5c577c1ff
commit
5617028ab6
@ -161,6 +161,12 @@ func TestAll(tt *testing.T) { // TODO(r): wrap up better
|
|||||||
value := reflect.NewValue(tmp);
|
value := reflect.NewValue(tmp);
|
||||||
assert(reflect.valueToString(value), "123.4");
|
assert(reflect.valueToString(value), "123.4");
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
var tmp = byte(123);
|
||||||
|
value := reflect.NewValue(tmp);
|
||||||
|
assert(reflect.valueToString(value), "123");
|
||||||
|
assert(reflect.typeToString(value.Type(), false), "uint8");
|
||||||
|
}
|
||||||
{ var tmp = "abc";
|
{ var tmp = "abc";
|
||||||
value := reflect.NewValue(tmp);
|
value := reflect.NewValue(tmp);
|
||||||
assert(reflect.valueToString(value), "abc");
|
assert(reflect.valueToString(value), "abc");
|
||||||
|
Loading…
Reference in New Issue
Block a user