Skip to content

Commit bff0b59

Browse files
committed
Add test cases for empty arrays and maps
1 parent af8a39f commit bff0b59

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

proto_test.go

+10
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ var protoTests = []struct {
6969
[]byte{0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 1},
7070
[]byte{8, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 1, 0, 0, 0},
7171
},
72+
{
73+
[]interface{}{map[string]Variant{}, byte(42)},
74+
[]byte{0, 0, 0, 0, 0, 0, 0, 0, 42},
75+
[]byte{0, 0, 0, 0, 0, 0, 0, 0, 42},
76+
},
77+
{
78+
[]interface{}{[]uint64{}, byte(42)},
79+
[]byte{0, 0, 0, 0, 0, 0, 0, 0, 42},
80+
[]byte{0, 0, 0, 0, 0, 0, 0, 0, 42},
81+
},
7282
}
7383

7484
func TestProto(t *testing.T) {

0 commit comments

Comments
 (0)