Chromium Code Reviews| Index: tools/json_schema_compiler/cpp_type_generator_test.py |
| diff --git a/tools/json_schema_compiler/cpp_type_generator_test.py b/tools/json_schema_compiler/cpp_type_generator_test.py |
| index 46d50347b9182468467e26dc4a517ee543d4e378..7cc534870f4ffa996c133830e1656f183db96b2d 100755 |
| --- a/tools/json_schema_compiler/cpp_type_generator_test.py |
| +++ b/tools/json_schema_compiler/cpp_type_generator_test.py |
| @@ -23,6 +23,10 @@ class CppTypeGeneratorTest(unittest.TestCase): |
| self.model.AddNamespace(self.tabs_json[0], |
| 'path/to/tabs.json') |
| self.tabs = self.model.namespaces.get('tabs') |
| + self.browser_action_json = CachedLoad('test/browserAction.json') |
| + self.model.AddNamespace(self.browser_action_json[0], |
| + 'path/to/browserAction.json') |
| + self.browser_action = self.model.namespaces.get('browserAction') |
| def testGenerateIncludesAndForwardDeclarations(self): |
| manager = CppTypeGenerator('', self.windows, self.windows.unix_name) |
| @@ -90,6 +94,13 @@ class CppTypeGeneratorTest(unittest.TestCase): |
| self.tabs.types['Tab'].properties['selected'])) |
| def testGetTypeArray(self): |
|
Yoyo Zhou
2012/04/09 23:48:47
Does this test the refs to arrays? (i.e. something
cduvall
2012/04/10 03:06:08
This tests if a type that is an array will generat
Yoyo Zhou
2012/04/10 19:26:48
Ok, but it's probably worth having a test with the
|
| + manager = CppTypeGenerator('', self.browser_action, |
| + self.browser_action.unix_name) |
| + self.assertEquals('std::vector<int>', |
| + manager.GetType( |
| + self.browser_action.types['ColorArray'])) |
| + |
| + def testGetTypeArray(self): |
| manager = CppTypeGenerator('', self.windows, self.windows.unix_name) |
| self.assertEquals('std::vector<linked_ptr<Window> >', |
| manager.GetType( |