| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 import sys | 5 import sys |
| 6 | 6 |
| 7 import data | 7 import data |
| 8 import test_support | 8 import test_support |
| 9 | 9 |
| 10 EXPECT_EQ = test_support.EXPECT_EQ | 10 EXPECT_EQ = test_support.EXPECT_EQ |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 test_dict = { | 37 test_dict = { |
| 38 'name': 'test', | 38 'name': 'test', |
| 39 'namespace': 'testspace', | 39 'namespace': 'testspace', |
| 40 'structs': [{ | 40 'structs': [{ |
| 41 'name': 'teststruct', | 41 'name': 'teststruct', |
| 42 'fields': [ | 42 'fields': [ |
| 43 {'name': 'testfield1', 'kind': 'i32'}, | 43 {'name': 'testfield1', 'kind': 'i32'}, |
| 44 {'name': 'testfield2', 'kind': 'a:i32', 'ordinal': 42}]}], | 44 {'name': 'testfield2', 'kind': 'a:i32', 'ordinal': 42}]}], |
| 45 'interfaces': [{ | 45 'interfaces': [{ |
| 46 'name': 'Server', | 46 'name': 'Server', |
| 47 'peer': None, | 47 'client': None, |
| 48 'methods': [{ | 48 'methods': [{ |
| 49 'name': 'Foo', | 49 'name': 'Foo', |
| 50 'parameters': [ | 50 'parameters': [ |
| 51 {'name': 'foo', 'kind': 'i32'}, | 51 {'name': 'foo', 'kind': 'i32'}, |
| 52 {'name': 'bar', 'kind': 'a:x:teststruct'}], | 52 {'name': 'bar', 'kind': 'a:x:teststruct'}], |
| 53 'ordinal': 42}]}] | 53 'ordinal': 42}]}] |
| 54 } | 54 } |
| 55 | 55 |
| 56 | 56 |
| 57 def TestRead(): | 57 def TestRead(): |
| (...skipping 19 matching lines...) Expand all Loading... |
| 77 errors = 0 | 77 errors = 0 |
| 78 errors += RunTest(TestWriteRead) | 78 errors += RunTest(TestWriteRead) |
| 79 errors += RunTest(TestRead) | 79 errors += RunTest(TestRead) |
| 80 errors += RunTest(TestWrite) | 80 errors += RunTest(TestWrite) |
| 81 | 81 |
| 82 return errors | 82 return errors |
| 83 | 83 |
| 84 | 84 |
| 85 if __name__ == '__main__': | 85 if __name__ == '__main__': |
| 86 sys.exit(Main(sys.argv[1:])) | 86 sys.exit(Main(sys.argv[1:])) |
| OLD | NEW |