Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: tools/json_schema_compiler/cpp_util_test.py

Issue 12041098: Initial commit of the Dart Chrome Extension APIs generators (Closed) Base URL: http://git.chromium.org/chromium/src.git@file_path_bugfix
Patch Set: Kalman fixes 2 (nocompile ignored in bundle mode) Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/json_schema_compiler/cpp_util.py ('k') | tools/json_schema_compiler/dart_generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/cpp_util_test.py
diff --git a/tools/json_schema_compiler/cpp_util_test.py b/tools/json_schema_compiler/cpp_util_test.py
index def85d95d0a86b7d211e0965fc9b6340e9b5514b..ede309587f33b96322fe8c98ed55bd925fc1167f 100755
--- a/tools/json_schema_compiler/cpp_util_test.py
+++ b/tools/json_schema_compiler/cpp_util_test.py
@@ -13,5 +13,19 @@ class CppUtilTest(unittest.TestCase):
cpp_util.Classname('updateAllTheThings'))
self.assertEquals('Aa_Bb_Cc', cpp_util.Classname('aa.bb.cc'))
+ def testNamespaceDeclaration(self):
+ self.assertEquals('namespace extensions {',
+ cpp_util.OpenNamespace('extensions').Render())
+ self.assertEquals('} // namespace extensions',
+ cpp_util.CloseNamespace('extensions').Render())
+ self.assertEquals('namespace extensions {\n'
+ 'namespace gen {\n'
+ 'namespace api {',
+ cpp_util.OpenNamespace('extensions::gen::api').Render())
+ self.assertEquals('} // namespace api\n'
+ '} // namespace gen\n'
+ '} // namespace extensions',
+ cpp_util.CloseNamespace('extensions::gen::api').Render())
+
if __name__ == '__main__':
unittest.main()
« no previous file with comments | « tools/json_schema_compiler/cpp_util.py ('k') | tools/json_schema_compiler/dart_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698