| 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" |
| 11 "fmt" | 11 "fmt" |
| 12 "io/ioutil" | 12 "io/ioutil" |
| 13 "mojo/public/go/bindings" | 13 "mojo/public/go/bindings" |
| 14 » "mojom/mojom_tool/generated/mojom_files" | 14 » "mojom/generated/mojom_files" |
| 15 » "mojom/mojom_tool/generated/mojom_types" | 15 » "mojom/generated/mojom_types" |
| 16 "mojom/mojom_tool/mojom" | 16 "mojom/mojom_tool/mojom" |
| 17 "mojom/mojom_tool/parser" | 17 "mojom/mojom_tool/parser" |
| 18 "reflect" | 18 "reflect" |
| 19 "testing" | 19 "testing" |
| 20 myfmt "third_party/golang/src/fmt" | 20 myfmt "third_party/golang/src/fmt" |
| 21 ) | 21 ) |
| 22 | 22 |
| 23 // singleFileTestCase stores the data for one serialization test case | 23 // singleFileTestCase stores the data for one serialization test case |
| 24 // in which only a single file is added to the file graph. | 24 // in which only a single file is added to the file graph. |
| 25 type singleFileTestCase struct { | 25 type singleFileTestCase struct { |
| (...skipping 3351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3377 } | 3377 } |
| 3378 return fmt.Errorf("*****\nexpected=\n*****\n%q\n*****\na
ctual=\n*****\n%q\n*****\n"+ | 3378 return fmt.Errorf("*****\nexpected=\n*****\n%q\n*****\na
ctual=\n*****\n%q\n*****\n"+ |
| 3379 "match failed at position %d: expected=\n*****\n
%q\n******\nactual=\n*****\n%q\n******\n", | 3379 "match failed at position %d: expected=\n*****\n
%q\n******\nactual=\n*****\n%q\n******\n", |
| 3380 expectedString, actualString, diffPos, mismatchE
xpected, mismatchActual) | 3380 expectedString, actualString, diffPos, mismatchE
xpected, mismatchActual) |
| 3381 } else { | 3381 } else { |
| 3382 return fmt.Errorf("expected != actual but the two printe
d equal.") | 3382 return fmt.Errorf("expected != actual but the two printe
d equal.") |
| 3383 } | 3383 } |
| 3384 } | 3384 } |
| 3385 return nil | 3385 return nil |
| 3386 } | 3386 } |
| OLD | NEW |