OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package serialization | 5 package serialization |
6 | 6 |
7 import ( | 7 import ( |
8 "bytes" | 8 "bytes" |
9 "compress/gzip" | 9 "compress/gzip" |
10 "encoding/base64" | 10 "encoding/base64" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 }, | 318 }, |
319 // field w | 319 // field w |
320 { | 320 { |
321 DeclData: test.newShortDeclDataO(3, 17,
"w"), | 321 DeclData: test.newShortDeclDataO(3, 17,
"w"), |
322 Type: &mojom_types.TypeSimpleType{mo
jom_types.SimpleType_Float}, | 322 Type: &mojom_types.TypeSimpleType{mo
jom_types.SimpleType_Float}, |
323 Tag: 17, | 323 Tag: 17, |
324 }, | 324 }, |
325 // field x | 325 // field x |
326 { | 326 { |
327 DeclData: test.newShortDeclDataO(0, 21,
"x"), | 327 DeclData: test.newShortDeclDataO(0, 21,
"x"), |
328 » » » » » Type: &mojom_types.TypeSimpleType{mo
jom_types.SimpleType_InT32}, | 328 » » » » » Type: &mojom_types.TypeSimpleType{mo
jom_types.SimpleType_Int32}, |
329 Tag: 21, | 329 Tag: 21, |
330 }, | 330 }, |
331 // field y | 331 // field y |
332 { | 332 { |
333 DeclData: test.newShortDeclDataO(1, 32,
"y"), | 333 DeclData: test.newShortDeclDataO(1, 32,
"y"), |
334 Type: &mojom_types.TypeStringType{mo
jom_types.StringType{false}}, | 334 Type: &mojom_types.TypeStringType{mo
jom_types.StringType{false}}, |
335 Tag: 32, | 335 Tag: 32, |
336 }, | 336 }, |
337 }, | 337 }, |
338 }} | 338 }} |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 }, | 375 }, |
376 // field w | 376 // field w |
377 { | 377 { |
378 DeclData: test.newShortDeclDataO(3, -1,
"w"), | 378 DeclData: test.newShortDeclDataO(3, -1,
"w"), |
379 Type: &mojom_types.TypeSimpleType{mo
jom_types.SimpleType_Float}, | 379 Type: &mojom_types.TypeSimpleType{mo
jom_types.SimpleType_Float}, |
380 Tag: 7, | 380 Tag: 7, |
381 }, | 381 }, |
382 // field x | 382 // field x |
383 { | 383 { |
384 DeclData: test.newShortDeclDataO(0, 21,
"x"), | 384 DeclData: test.newShortDeclDataO(0, 21,
"x"), |
385 » » » » » Type: &mojom_types.TypeSimpleType{mo
jom_types.SimpleType_InT32}, | 385 » » » » » Type: &mojom_types.TypeSimpleType{mo
jom_types.SimpleType_Int32}, |
386 Tag: 21, | 386 Tag: 21, |
387 }, | 387 }, |
388 // field y | 388 // field y |
389 { | 389 { |
390 DeclData: test.newShortDeclDataO(1, -1,
"y"), | 390 DeclData: test.newShortDeclDataO(1, -1,
"y"), |
391 Type: &mojom_types.TypeStringType{mo
jom_types.StringType{false}}, | 391 Type: &mojom_types.TypeStringType{mo
jom_types.StringType{false}}, |
392 Tag: 22, | 392 Tag: 22, |
393 }, | 393 }, |
394 }, | 394 }, |
395 }} | 395 }} |
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2229 } | 2229 } |
2230 return fmt.Errorf("*****\nexpected=\n*****\n%q\n*****\na
ctual=\n*****\n%q\n*****\n"+ | 2230 return fmt.Errorf("*****\nexpected=\n*****\n%q\n*****\na
ctual=\n*****\n%q\n*****\n"+ |
2231 "match failed at position %d: expected=\n*****\n
%q\n******\nactual=\n*****\n%q\n******\n", | 2231 "match failed at position %d: expected=\n*****\n
%q\n******\nactual=\n*****\n%q\n******\n", |
2232 expectedString, actualString, diffPos, mismatchE
xpected, mismatchActual) | 2232 expectedString, actualString, diffPos, mismatchE
xpected, mismatchActual) |
2233 } else { | 2233 } else { |
2234 return fmt.Errorf("expected != actual but the two printe
d equal.") | 2234 return fmt.Errorf("expected != actual but the two printe
d equal.") |
2235 } | 2235 } |
2236 } | 2236 } |
2237 return nil | 2237 return nil |
2238 } | 2238 } |
OLD | NEW |