|
16 | 16 | tag02Body2 = []byte{0x04, 0x00, 0x11, 0x08, 0x00, 0x1d, 0x16, 0x21, 0x04, 0x1b, 0x52, 0x02, 0xdb, 0x4a, 0x3e, 0xc7, 0x76, 0xf1, 0xe0, 0xad, 0x18, 0xb4, 0xda, 0x3b, 0xae, 0x7e, 0x20, 0xb8, 0x1c, 0x05, 0x02, 0x5a, 0x19, 0x0d, 0xe4, 0x00, 0x0a, 0x09, 0x10, 0xb4, 0xda, 0x3b, 0xae, 0x7e, 0x20, 0xb8, 0x1c, 0x73, 0x3c, 0x01, 0x00, 0x84, 0xef, 0xee, 0xae, 0x22, 0x69, 0x2e, 0xaf, 0x33, 0xb3, 0x85, 0xe1, 0xee, 0xaa, 0x5d, 0x2f, 0x7a, 0xd4, 0xae, 0xa3, 0x92, 0xd3, 0xe8, 0x73, 0xd4, 0xb0, 0x00, 0x3e, 0xc9, 0x2b, 0x80, 0xf7, 0x00, 0xff, 0x7c, 0xcc, 0xb9, 0xd2, 0x06, 0x48, 0xb3, 0x39, 0x58, 0x9b, 0xa8, 0x99, 0xc5, 0xc2, 0x53, 0x62, 0xbd, 0x8f, 0x16, 0x49, 0x73, 0xe0, 0x65, 0xfe, 0xa6, 0xf7, 0x18, 0x1a, 0x78, 0xff, 0x65, 0xe6}
|
17 | 17 | tag02Body3 = []byte{0x04, 0x18, 0x13, 0x08, 0x00, 0x0f, 0x05, 0x02, 0x54, 0xc3, 0x01, 0xbf, 0x02, 0x1b, 0x0c, 0x05, 0x09, 0x00, 0x09, 0x3a, 0x80, 0x00, 0x0a, 0x09, 0x10, 0x31, 0xfb, 0xfd, 0xa9, 0x5f, 0xbb, 0xfa, 0x18, 0xc6, 0x27, 0x01, 0x00, 0xc0, 0x2f, 0x76, 0x5a, 0x10, 0x6d, 0x1d, 0x22, 0x1e, 0x62, 0xc1, 0x9b, 0xbc, 0x62, 0xd1, 0x06, 0x4a, 0xf1, 0x3a, 0x47, 0x5a, 0xe9, 0x0b, 0xf1, 0x39, 0x6c, 0xe3, 0x67, 0xa0, 0x96, 0x3c, 0xd2, 0x01, 0x00, 0x8c, 0x59, 0x1c, 0x3a, 0x85, 0x0e, 0x1e, 0xd3, 0x98, 0x45, 0x13, 0x4d, 0x30, 0xe2, 0xb9, 0xa4, 0x15, 0x0e, 0x1b, 0x6d, 0x66, 0x1a, 0xa7, 0xe7, 0xd5, 0xe2, 0x51, 0x07, 0x95, 0x60, 0x87, 0x91}
|
18 | 18 | tag02Body4 = []byte{0x03, 0x05, 0x00, 0x36, 0x5e, 0xba, 0x44, 0x0f, 0x64, 0x8a, 0x1c, 0x9e, 0x4f, 0x74, 0x4d, 0x01, 0x01, 0x66, 0x36, 0x04, 0x00, 0x8f, 0x8c, 0x6b, 0x45, 0xa7, 0x65, 0xbd, 0x37, 0xf6, 0x76, 0x58, 0x85, 0x7c, 0x39, 0x66, 0x7a, 0xc5, 0xc1, 0x48, 0xf3, 0xb8, 0x85, 0x69, 0x7f, 0x22, 0x54, 0x71, 0x50, 0x0e, 0x97, 0xb2, 0x51, 0x77, 0x53, 0xa2, 0x22, 0xd4, 0x46, 0xec, 0x0c, 0x50, 0xbe, 0xee, 0xe6, 0xb0, 0xc2, 0x76, 0x08, 0xf0, 0x6b, 0x0e, 0x6c, 0xfc, 0xe6, 0xef, 0xcd, 0x10, 0x3d, 0x10, 0xfd, 0xb3, 0x87, 0x40, 0x20, 0x55, 0x6c, 0x06, 0xae, 0x41, 0xc5, 0x7c, 0x0d, 0x17, 0x75, 0x44, 0x32, 0x7d, 0x08, 0x41, 0x45, 0x95, 0xda, 0xd6, 0x57, 0x74, 0x58, 0x38, 0x72, 0x6e, 0xf7, 0x1f, 0x63, 0xce, 0xd8, 0x00, 0x1b, 0x25, 0x37, 0x23, 0xb2, 0x56, 0x1a, 0x02, 0x9a, 0xee, 0x5a, 0x57, 0xf7, 0xa3, 0xab, 0x2d, 0x89, 0x20, 0x85, 0x1c, 0xc5, 0xc0, 0xec, 0x64, 0xe9, 0x2f, 0x0b, 0xf5, 0x4b, 0x5f, 0x2b, 0x65, 0x39}
|
| 19 | + tag02Body5 = []byte{0x04, 0x13, 0x01, 0x08, 0x00, 0x1e, 0x05, 0x02, 0x5a, 0xfa, 0x85, 0x65, 0x02, 0x9b, 0x2f, 0x05, 0x8b, 0x09, 0x08, 0x07, 0x02, 0x06, 0x95, 0x0a, 0x09, 0x08, 0x0b, 0x02, 0x04, 0x96, 0x02, 0x03, 0x01, 0x02, 0x9e, 0x01, 0x00, 0x0a, 0x09, 0x10, 0x8e, 0x3d, 0xba, 0x0e, 0xc4, 0xdc, 0xc3, 0xb7, 0xef, 0x56, 0x07, 0xff, 0x63, 0xcf, 0x00, 0x07, 0x32, 0xd7, 0x4c, 0x58, 0x0b, 0xa3, 0x81, 0x0e, 0xd7, 0x3e, 0xde, 0x04, 0xd4, 0xf8, 0x63, 0x87, 0x49, 0xf3, 0x3c, 0x8a, 0x36, 0x47, 0x30, 0x25, 0x15, 0x5b, 0x3a, 0xea, 0x75, 0x95, 0x53, 0x70, 0x31, 0xbe, 0xb9, 0x23, 0x2a, 0xa7, 0xc5, 0xb4, 0xd7, 0x56, 0xcb, 0x00, 0x1c, 0xc6, 0x03, 0xf4, 0x49, 0x87, 0xcd, 0x07, 0xd5, 0xd4, 0x1f, 0xc1, 0x95, 0xc1, 0xf7, 0x0e, 0x16, 0x27, 0x54, 0xda, 0x4e, 0xa0, 0xea, 0xde, 0x5b, 0xdd, 0xeb, 0x4d, 0x17, 0x19, 0x4b, 0x61, 0x30, 0x52, 0xd0, 0x02, 0x50, 0x16, 0x5a, 0xb5, 0xcf, 0xa7, 0x64, 0x2c, 0x89, 0xff, 0x67, 0x12, 0x9b, 0xce, 0xb6, 0xba, 0x92, 0xa4, 0x61, 0x25, 0x96, 0x06, 0x14, 0x23, 0xed, 0x6d, 0x30, 0x8f, 0xe5, 0x26, 0x9c, 0x66, 0x5b, 0x6f, 0x34, 0x05, 0x66, 0x13, 0xb7, 0xcd, 0x90, 0xbc, 0x38, 0x84, 0xaf, 0x5f, 0x8f, 0x20, 0x07, 0xd0, 0xe5, 0xbd, 0x17, 0x23, 0x4f, 0x2a, 0x5d, 0x37, 0x17, 0xd8, 0xf8, 0xb4, 0x2f, 0xe6, 0xbe, 0x28, 0x79, 0xbc, 0x00, 0x05, 0x18, 0xac, 0xab, 0xd6, 0xea, 0x9d, 0xf4, 0x6c, 0x1a, 0xdd, 0xc9, 0x6a, 0x87, 0x9e, 0x19, 0x2f, 0xff, 0x12, 0xaa, 0x69, 0x49, 0x3e, 0x93, 0xee, 0x78, 0x8c, 0xf7, 0xab, 0x29, 0xd5, 0xdc, 0x47, 0x50, 0xa6, 0x94, 0x02, 0xa4, 0xb4, 0x97, 0x10, 0xa4, 0x7d, 0x4a, 0x36, 0xbe, 0xfe, 0xe9, 0x1f, 0xc4, 0x44, 0x63, 0x7b, 0x75, 0x55, 0x3b, 0xd5, 0x7b, 0xf7, 0x76, 0x16, 0x93, 0x01, 0xb3, 0xbe, 0xf0, 0x1c, 0xc4, 0x12, 0x2a, 0x51, 0x99, 0xa2, 0xf4, 0x9d, 0x22, 0x0a, 0x51, 0x8c, 0x96, 0x77, 0x4d, 0x94, 0x24, 0x32, 0x0a, 0xde, 0x5b, 0x7d, 0x53, 0x4b, 0x24, 0xab, 0xfc, 0x30, 0x99, 0xd8, 0x7c, 0x0b, 0x88, 0x8a, 0x75, 0x4d} |
19 | 20 | )
|
20 | 21 |
|
21 | 22 | const (
|
@@ -120,106 +121,111 @@ const (
|
120 | 121 | 66 36
|
121 | 122 | RSA signature value m^d mod n (1024 bits)
|
122 | 123 | 8f 8c 6b 45 a7 65 bd 37 f6 76 58 85 7c 39 66 7a c5 c1 48 f3 b8 85 69 7f 22 54 71 50 0e 97 b2 51 77 53 a2 22 d4 46 ec 0c 50 be ee e6 b0 c2 76 08 f0 6b 0e 6c fc e6 ef cd 10 3d 10 fd b3 87 40 20 55 6c 06 ae 41 c5 7c 0d 17 75 44 32 7d 08 41 45 95 da d6 57 74 58 38 72 6e f7 1f 63 ce d8 00 1b 25 37 23 b2 56 1a 02 9a ee 5a 57 f7 a3 ab 2d 89 20 85 1c c5 c0 ec 64 e9 2f 0b f5 4b 5f 2b 65 39
|
| 124 | +` |
| 125 | + tag02Redult5 = `Signature Packet (tag 2) (308 bytes) |
| 126 | + 04 13 01 08 00 1e 05 02 5a fa 85 65 02 9b 2f 05 8b 09 08 07 02 06 95 0a 09 08 0b 02 04 96 02 03 01 02 9e 01 00 0a 09 10 8e 3d ba 0e c4 dc c3 b7 ef 56 07 ff 63 cf 00 07 32 d7 4c 58 0b a3 81 0e d7 3e de 04 d4 f8 63 87 49 f3 3c 8a 36 47 30 25 15 5b 3a ea 75 95 53 70 31 be b9 23 2a a7 c5 b4 d7 56 cb 00 1c c6 03 f4 49 87 cd 07 d5 d4 1f c1 95 c1 f7 0e 16 27 54 da 4e a0 ea de 5b dd eb 4d 17 19 4b 61 30 52 d0 02 50 16 5a b5 cf a7 64 2c 89 ff 67 12 9b ce b6 ba 92 a4 61 25 96 06 14 23 ed 6d 30 8f e5 26 9c 66 5b 6f 34 05 66 13 b7 cd 90 bc 38 84 af 5f 8f 20 07 d0 e5 bd 17 23 4f 2a 5d 37 17 d8 f8 b4 2f e6 be 28 79 bc 00 05 18 ac ab d6 ea 9d f4 6c 1a dd c9 6a 87 9e 19 2f ff 12 aa 69 49 3e 93 ee 78 8c f7 ab 29 d5 dc 47 50 a6 94 02 a4 b4 97 10 a4 7d 4a 36 be fe e9 1f c4 44 63 7b 75 55 3b d5 7b f7 76 16 93 01 b3 be f0 1c c4 12 2a 51 99 a2 f4 9d 22 0a 51 8c 96 77 4d 94 24 32 0a de 5b 7d 53 4b 24 ab fc 30 99 d8 7c 0b 88 8a 75 4d |
| 127 | + Version: 4 (current) |
| 128 | + 04 |
| 129 | + Signiture Type: Positive certification of a User ID and Public-Key packet (0x13) |
| 130 | + 13 |
| 131 | + Public-key Algorithm: RSA (Encrypt or Sign) (pub 1) |
| 132 | + 01 |
| 133 | + Hash Algorithm: SHA2-256 (hash 8) |
| 134 | + 08 |
| 135 | + Hashed Subpacket (30 bytes) |
| 136 | + 05 02 5a fa 85 65 02 9b 2f 05 8b 09 08 07 02 06 95 0a 09 08 0b 02 04 96 02 03 01 02 9e 01 |
| 137 | + Signature Creation Time (sub 2): 2018-05-15T06:59:49Z |
| 138 | + 5a fa 85 65 |
| 139 | + Key Flags <critical> (sub 27) (1 bytes) |
| 140 | + 2f |
| 141 | + Flag: This key may be used to certify other keys. |
| 142 | + Flag: This key may be used to sign data. |
| 143 | + Flag: This key may be used to encrypt communications. |
| 144 | + Flag: This key may be used to encrypt storage. |
| 145 | + Flag: This key may be used for authentication. |
| 146 | + Preferred Symmetric Algorithms <critical> (sub 11) (4 bytes) |
| 147 | + 09 08 07 02 |
| 148 | + Symmetric Algorithm: AES with 256-bit key (sym 9) |
| 149 | + 09 |
| 150 | + Symmetric Algorithm: AES with 192-bit key (sym 8) |
| 151 | + 08 |
| 152 | + Symmetric Algorithm: AES with 128-bit key (sym 7) |
| 153 | + 07 |
| 154 | + Symmetric Algorithm: TripleDES (168 bit key derived from 192) (sym 2) |
| 155 | + 02 |
| 156 | + Preferred Hash Algorithms <critical> (sub 21) (5 bytes) |
| 157 | + 0a 09 08 0b 02 |
| 158 | + Hash Algorithm: SHA2-512 (hash 10) |
| 159 | + 0a |
| 160 | + Hash Algorithm: SHA2-384 (hash 9) |
| 161 | + 09 |
| 162 | + Hash Algorithm: SHA2-256 (hash 8) |
| 163 | + 08 |
| 164 | + Hash Algorithm: SHA2-224 (hash 11) |
| 165 | + 0b |
| 166 | + Hash Algorithm: SHA-1 (hash 2) |
| 167 | + 02 |
| 168 | + Preferred Compression Algorithms <critical> (sub 22) (3 bytes) |
| 169 | + 02 03 01 |
| 170 | + Compression Algorithm: ZLIB <RFC1950> (comp 2) |
| 171 | + 02 |
| 172 | + Compression Algorithm: BZip2 (comp 3) |
| 173 | + 03 |
| 174 | + Compression Algorithm: ZIP <RFC1951> (comp 1) |
| 175 | + 01 |
| 176 | + Features <critical> (sub 30) (1 bytes) |
| 177 | + 01 |
| 178 | + Flag: Modification Detection (packets 18 and 19) |
| 179 | + Unhashed Subpacket (10 bytes) |
| 180 | + 09 10 8e 3d ba 0e c4 dc c3 b7 |
| 181 | + Issuer (sub 16): 0x8e3dba0ec4dcc3b7 |
| 182 | + Hash left 2 bytes |
| 183 | + ef 56 |
| 184 | + RSA signature value m^d mod n (2047 bits) |
| 185 | + 63 cf 00 07 32 d7 4c 58 0b a3 81 0e d7 3e de 04 d4 f8 63 87 49 f3 3c 8a 36 47 30 25 15 5b 3a ea 75 95 53 70 31 be b9 23 2a a7 c5 b4 d7 56 cb 00 1c c6 03 f4 49 87 cd 07 d5 d4 1f c1 95 c1 f7 0e 16 27 54 da 4e a0 ea de 5b dd eb 4d 17 19 4b 61 30 52 d0 02 50 16 5a b5 cf a7 64 2c 89 ff 67 12 9b ce b6 ba 92 a4 61 25 96 06 14 23 ed 6d 30 8f e5 26 9c 66 5b 6f 34 05 66 13 b7 cd 90 bc 38 84 af 5f 8f 20 07 d0 e5 bd 17 23 4f 2a 5d 37 17 d8 f8 b4 2f e6 be 28 79 bc 00 05 18 ac ab d6 ea 9d f4 6c 1a dd c9 6a 87 9e 19 2f ff 12 aa 69 49 3e 93 ee 78 8c f7 ab 29 d5 dc 47 50 a6 94 02 a4 b4 97 10 a4 7d 4a 36 be fe e9 1f c4 44 63 7b 75 55 3b d5 7b f7 76 16 93 01 b3 be f0 1c c4 12 2a 51 99 a2 f4 9d 22 0a 51 8c 96 77 4d 94 24 32 0a de 5b 7d 53 4b 24 ab fc 30 99 d8 7c 0b 88 8a 75 4d |
123 | 186 | `
|
124 | 187 | )
|
125 | 188 |
|
126 |
| -func TestTag02a(t *testing.T) { |
127 |
| - op := &openpgp.OpaquePacket{Tag: 2, Contents: tag02Body1} |
128 |
| - cxt := context.NewContext(options.New( |
129 |
| - options.Set(options.DebugOpt, true), |
130 |
| - options.Set(options.IntegerOpt, true), |
131 |
| - options.Set(options.MarkerOpt, true), |
132 |
| - options.Set(options.LiteralOpt, true), |
133 |
| - options.Set(options.PrivateOpt, true), |
134 |
| - options.Set(options.UTCOpt, true), |
135 |
| - )) |
136 |
| - i, err := NewTag(op, cxt).Parse() |
137 |
| - if err != nil { |
138 |
| - t.Errorf("NewTag() = %v, want nil error.", err) |
139 |
| - return |
140 |
| - } |
141 |
| - if cxt.AlgMode() != context.ModeNotSpecified { |
142 |
| - t.Errorf("Options.Mode = %v, want \"%v\".", cxt.AlgMode(), context.ModeNotSpecified) |
143 |
| - } |
144 |
| - str := i.String() |
145 |
| - if str != tag02Redult1 { |
146 |
| - t.Errorf("Tag.String = \"%s\", want \"%s\".", str, tag02Redult1) |
147 |
| - } |
148 |
| -} |
149 |
| - |
150 |
| -func TestTag02b(t *testing.T) { |
151 |
| - op := &openpgp.OpaquePacket{Tag: 2, Contents: tag02Body2} |
152 |
| - cxt := context.NewContext(options.New( |
153 |
| - options.Set(options.DebugOpt, true), |
154 |
| - options.Set(options.IntegerOpt, true), |
155 |
| - options.Set(options.MarkerOpt, true), |
156 |
| - options.Set(options.LiteralOpt, true), |
157 |
| - options.Set(options.PrivateOpt, true), |
158 |
| - options.Set(options.UTCOpt, true), |
159 |
| - )) |
160 |
| - i, err := NewTag(op, cxt).Parse() |
161 |
| - if err != nil { |
162 |
| - t.Errorf("NewTag() = %v, want nil error.", err) |
163 |
| - return |
164 |
| - } |
165 |
| - if cxt.AlgMode() != context.ModeNotSpecified { |
166 |
| - t.Errorf("Options.Mode = %v, want \"%v\".", cxt.AlgMode(), context.ModeNotSpecified) |
167 |
| - } |
168 |
| - str := i.String() |
169 |
| - if str != tag02Redult2 { |
170 |
| - t.Errorf("Tag.String = \"%s\", want \"%s\".", str, tag02Redult2) |
171 |
| - } |
172 |
| -} |
173 |
| - |
174 |
| -func TestTag02c(t *testing.T) { |
175 |
| - op := &openpgp.OpaquePacket{Tag: 2, Contents: tag02Body3} |
176 |
| - cxt := context.NewContext(options.New( |
177 |
| - options.Set(options.DebugOpt, true), |
178 |
| - options.Set(options.IntegerOpt, true), |
179 |
| - options.Set(options.MarkerOpt, true), |
180 |
| - options.Set(options.LiteralOpt, true), |
181 |
| - options.Set(options.PrivateOpt, true), |
182 |
| - options.Set(options.UTCOpt, true), |
183 |
| - )) |
184 |
| - tm, _ := values.NewDateTime(reader.New([]byte{0x54, 0xc3, 0x01, 0xbf}), cxt.UTC()) |
185 |
| - cxt.KeyCreationTime = tm |
186 |
| - i, err := NewTag(op, cxt).Parse() |
187 |
| - if err != nil { |
188 |
| - t.Errorf("NewTag() = %v, want nil error.", err) |
189 |
| - return |
190 |
| - } |
191 |
| - if cxt.AlgMode() != context.ModeNotSpecified { |
192 |
| - t.Errorf("Options.Mode = %v, want \"%v\".", cxt.AlgMode(), context.ModeNotSpecified) |
193 |
| - } |
194 |
| - str := i.String() |
195 |
| - if str != tag02Redult3 { |
196 |
| - t.Errorf("Tag.String = \"%s\", want \"%s\".", str, tag02Redult3) |
197 |
| - } |
198 |
| -} |
199 |
| - |
200 |
| -func TestTag02d(t *testing.T) { |
201 |
| - op := &openpgp.OpaquePacket{Tag: 2, Contents: tag02Body4} |
202 |
| - cxt := context.NewContext(options.New( |
203 |
| - options.Set(options.DebugOpt, true), |
204 |
| - options.Set(options.IntegerOpt, true), |
205 |
| - options.Set(options.MarkerOpt, true), |
206 |
| - options.Set(options.LiteralOpt, true), |
207 |
| - options.Set(options.PrivateOpt, true), |
208 |
| - options.Set(options.UTCOpt, true), |
209 |
| - )) |
210 |
| - tm, _ := values.NewDateTime(reader.New([]byte{0x54, 0xc3, 0x01, 0xbf}), cxt.UTC()) |
211 |
| - cxt.KeyCreationTime = tm |
212 |
| - i, err := NewTag(op, cxt).Parse() |
213 |
| - if err != nil { |
214 |
| - t.Errorf("NewTag() = %v, want nil error.", err) |
215 |
| - return |
216 |
| - } |
217 |
| - if cxt.AlgMode() != context.ModeNotSpecified { |
218 |
| - t.Errorf("Options.Mode = %v, want \"%v\".", cxt.AlgMode(), context.ModeNotSpecified) |
| 189 | +func TestTag02(t *testing.T) { |
| 190 | + testCases := []struct { |
| 191 | + tag uint8 |
| 192 | + content []byte |
| 193 | + ktm []byte |
| 194 | + cxt context.SymAlgMode |
| 195 | + res string |
| 196 | + }{ |
| 197 | + {tag: 2, content: tag02Body1, ktm: nil, cxt: context.ModeNotSpecified, res: tag02Redult1}, |
| 198 | + {tag: 2, content: tag02Body2, ktm: nil, cxt: context.ModeNotSpecified, res: tag02Redult2}, |
| 199 | + {tag: 2, content: tag02Body3, ktm: []byte{0x54, 0xc3, 0x01, 0xbf}, cxt: context.ModeNotSpecified, res: tag02Redult3}, |
| 200 | + {tag: 2, content: tag02Body4, ktm: []byte{0x54, 0xc3, 0x01, 0xbf}, cxt: context.ModeNotSpecified, res: tag02Redult4}, |
| 201 | + {tag: 2, content: tag02Body5, ktm: []byte{0x54, 0xc3, 0x01, 0xbf}, cxt: context.ModeNotSpecified, res: tag02Redult5}, |
219 | 202 | }
|
220 |
| - str := i.String() |
221 |
| - if str != tag02Redult4 { |
222 |
| - t.Errorf("Tag.String = \"%s\", want \"%s\".", str, tag02Redult4) |
| 203 | + for _, tc := range testCases { |
| 204 | + op := &openpgp.OpaquePacket{Tag: tc.tag, Contents: tc.content} |
| 205 | + cxt := context.NewContext(options.New( |
| 206 | + options.Set(options.DebugOpt, true), |
| 207 | + options.Set(options.IntegerOpt, true), |
| 208 | + options.Set(options.MarkerOpt, true), |
| 209 | + options.Set(options.LiteralOpt, true), |
| 210 | + options.Set(options.PrivateOpt, true), |
| 211 | + options.Set(options.UTCOpt, true), |
| 212 | + )) |
| 213 | + if tc.ktm != nil { |
| 214 | + tm, _ := values.NewDateTime(reader.New(tc.ktm), cxt.UTC()) |
| 215 | + cxt.KeyCreationTime = tm |
| 216 | + } |
| 217 | + i, err := NewTag(op, cxt).Parse() |
| 218 | + if err != nil { |
| 219 | + t.Errorf("NewTag() = %v, want nil error.", err) |
| 220 | + return |
| 221 | + } |
| 222 | + if cxt.AlgMode() != tc.cxt { |
| 223 | + t.Errorf("Options.Mode = %v, want \"%v\".", cxt.AlgMode(), tc.cxt) |
| 224 | + } |
| 225 | + res := i.String() |
| 226 | + if res != tc.res { |
| 227 | + t.Errorf("Tag.String = \"%s\", want \"%s\".", res, tc.res) |
| 228 | + } |
223 | 229 | }
|
224 | 230 | }
|
225 | 231 |
|
|
0 commit comments