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

Unified Diff: tools/json_schema_compiler/cpp_util_test.py

Issue 682493002: Remove the dependency on json schema compiler. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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
deleted file mode 100755
index eef4c554b5333d1ecdd976014af347c7973c38d7..0000000000000000000000000000000000000000
--- a/tools/json_schema_compiler/cpp_util_test.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import unittest
-
-from cpp_util import (
- Classname, CloseNamespace, GenerateIfndefName, OpenNamespace)
-
-class CppUtilTest(unittest.TestCase):
- def testClassname(self):
- self.assertEquals('Permissions', Classname('permissions'))
- self.assertEquals('UpdateAllTheThings',
- Classname('updateAllTheThings'))
- self.assertEquals('Aa_Bb_Cc', Classname('aa.bb.cc'))
-
- def testNamespaceDeclaration(self):
- self.assertEquals('namespace foo {',
- OpenNamespace('foo').Render())
- self.assertEquals('} // namespace foo',
- CloseNamespace('foo').Render())
-
- self.assertEquals(
- 'namespace extensions {\n'
- 'namespace foo {',
- OpenNamespace('extensions::foo').Render())
- self.assertEquals(
- '} // namespace foo\n'
- '} // namespace extensions',
- CloseNamespace('extensions::foo').Render())
-
- self.assertEquals(
- 'namespace extensions {\n'
- 'namespace gen {\n'
- 'namespace api {',
- OpenNamespace('extensions::gen::api').Render())
- self.assertEquals(
- '} // namespace api\n'
- '} // namespace gen\n'
- '} // namespace extensions',
- CloseNamespace('extensions::gen::api').Render())
-
- self.assertEquals(
- 'namespace extensions {\n'
- 'namespace gen {\n'
- 'namespace api {\n'
- 'namespace foo {',
- OpenNamespace('extensions::gen::api::foo').Render())
- self.assertEquals(
- '} // namespace foo\n'
- '} // namespace api\n'
- '} // namespace gen\n'
- '} // namespace extensions',
- CloseNamespace('extensions::gen::api::foo').Render())
-
- def testGenerateIfndefName(self):
- self.assertEquals('FOO_BAR_BAZ_H__', GenerateIfndefName('foo\\bar\\baz.h'))
- self.assertEquals('FOO_BAR_BAZ_H__', GenerateIfndefName('foo/bar/baz.h'))
-
-
-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