Index: src/pkg/asn1/asn1_test.go |
=================================================================== |
--- a/src/pkg/asn1/asn1_test.go |
+++ b/src/pkg/asn1/asn1_test.go |
@@ -263,6 +263,11 @@ |
B int |
} |
+type TestElementsAfterString struct { |
+ S string |
+ A, B int |
+} |
+ |
var unmarshalTestData []unmarshalTest = []unmarshalTest{ |
unmarshalTest{[]byte{0x02, 0x01, 0x42}, newInt(0x42)}, |
unmarshalTest{[]byte{0x30, 0x08, 0x06, 0x06, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d}, &TestObjectIdentifierStruct{[]int{1, 2, 840, 113549}}}, |
@@ -277,6 +282,7 @@ |
unmarshalTest{[]byte{0x30, 0x08, 0xa1, 0x03, 0x02, 0x01, 0x01, 0x02, 0x01, 0x02}, &TestContextSpecificTags2{1, 2}}, |
unmarshalTest{[]byte{0x01, 0x01, 0x00}, newBool(false)}, |
unmarshalTest{[]byte{0x01, 0x01, 0x01}, newBool(true)}, |
+ unmarshalTest{[]byte{0x30, 0x0b, 0x13, 0x03, 0x66, 0x6f, 0x6f, 0x02, 0x01, 0x22, 0x02, 0x01, 0x33}, &TestElementsAfterString{"foo", 0x22, 0x33}}, |
} |
func TestUnmarshal(t *testing.T) { |