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

Unified Diff: tools/json_schema_compiler/model_test.py

Issue 273323002: Convert snakecase enum names to camelcase when stringified. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address feedback Created 6 years, 7 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
Index: tools/json_schema_compiler/model_test.py
diff --git a/tools/json_schema_compiler/model_test.py b/tools/json_schema_compiler/model_test.py
index 0e398a5a5bb2b969d81d4967d5bd2b09c0c042cc..2961bfc4e905d14b3ddb9af4856ffeff79bca732 100755
--- a/tools/json_schema_compiler/model_test.py
+++ b/tools/json_schema_compiler/model_test.py
@@ -118,6 +118,17 @@ class ModelTest(unittest.TestCase):
for name in expectations:
self.assertEquals(expectations[name], model.UnixName(name))
+ def testCamelName(self):
+ expectations = {
+ 'foo': 'foo',
+ 'fooBar': 'fooBar',
+ 'foo_bar_baz': 'fooBarBaz',
+ 'FOO_BAR': 'FOOBAR',
+ 'FOO_bar': 'FOOBar',
not at google - send to devlin 2014/05/14 16:18:14 even though the result is uninterested, please als
David Tseng 2014/05/14 18:11:31 Done.
+ }
+ for name in expectations:
+ self.assertEquals(expectations[name], model.CamelName(name))
not at google - send to devlin 2014/05/14 16:18:14 slightly nicer: for expected, testcase in expecta
David Tseng 2014/05/14 18:11:31 Done. (but note that the expected/testcase are fl
+
def testPlatforms(self):
self.assertEqual([Platforms.CHROMEOS],
self.idl_namespace_chromeos.platforms)

Powered by Google App Engine
This is Rietveld 408576698