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

Unified Diff: tools/json_schema_compiler/code_test.py

Issue 9491002: json_schema_compiler: any, additionalProperties, functions on types (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add any in arrays to util.h Created 8 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/code.py ('k') | tools/json_schema_compiler/compiler.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/code_test.py
diff --git a/tools/json_schema_compiler/code_test.py b/tools/json_schema_compiler/code_test.py
index 8431d9540d9e2eb42e29275dfceb71aa2c6f0278..a089f7fb6f88125db39f1e171f36f64b91f2d534 100644
--- a/tools/json_schema_compiler/code_test.py
+++ b/tools/json_schema_compiler/code_test.py
@@ -148,5 +148,17 @@ class CodeTest(unittest.TestCase):
'// ' + 'x' * 23,
c.Render())
+ def testCommentWithSpecialCharacters(self):
+ c = Code()
+ c.Comment('20% of 80%s')
+ c.Substitute({})
+ self.assertEquals('// 20% of 80%s', c.Render())
+ d = Code()
+ d.Append('90')
+ d.Concat(c)
+ self.assertEquals('90\n'
+ '// 20% of 80%s',
+ d.Render())
+
if __name__ == '__main__':
unittest.main()
« no previous file with comments | « tools/json_schema_compiler/code.py ('k') | tools/json_schema_compiler/compiler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698