mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
the name of the type was being sent twice. drop the outer instance.
R=rsc DELTA=10 (5 added, 1 deleted, 4 changed) OCL=31523 CL=31526
This commit is contained in:
parent
7b7b83ba1b
commit
b2a66adc59
3 changed files with 9 additions and 5 deletions
|
|
@ -72,7 +72,7 @@ func TestBasicEncoder(t *testing.T) {
|
|||
t.Fatal("error decoding ET1 type:", err);
|
||||
}
|
||||
info := getTypeInfo(reflect.Typeof(ET1{}));
|
||||
trueWire1 := &wireType{name:"ET1", s: info.typeId.gobType().(*structType)};
|
||||
trueWire1 := &wireType{s: info.typeId.gobType().(*structType)};
|
||||
if !reflect.DeepEqual(wire1, trueWire1) {
|
||||
t.Fatalf("invalid wireType for ET1: expected %+v; got %+v\n", *trueWire1, *wire1);
|
||||
}
|
||||
|
|
@ -88,7 +88,7 @@ func TestBasicEncoder(t *testing.T) {
|
|||
t.Fatal("error decoding ET2 type:", err);
|
||||
}
|
||||
info = getTypeInfo(reflect.Typeof(ET2{}));
|
||||
trueWire2 := &wireType{name:"ET2", s: info.typeId.gobType().(*structType)};
|
||||
trueWire2 := &wireType{s: info.typeId.gobType().(*structType)};
|
||||
if !reflect.DeepEqual(wire2, trueWire2) {
|
||||
t.Fatalf("invalid wireType for ET2: expected %+v; got %+v\n", *trueWire2, *wire2);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue