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

Unified Diff: tools/json_schema_compiler/code_test.py

Issue 1062573004: [Extension API Extern Generation] Fix a few bugs in extern generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dan's Created 5 years, 8 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/code_test.py
diff --git a/tools/json_schema_compiler/code_test.py b/tools/json_schema_compiler/code_test.py
index 7d64b6c0a04490a6f5d1cdcf6be53f296324faf1..90e2879340861720af6f8153c4a1dca6af765a87 100755
--- a/tools/json_schema_compiler/code_test.py
+++ b/tools/json_schema_compiler/code_test.py
@@ -191,7 +191,7 @@ class CodeTest(unittest.TestCase):
' */',
output)
- def testSameLineAppendAndConcat(self):
+ def testSameLineAppendConcatComment(self):
c = Code()
c.Append('This is a line.')
c.Append('This too.', new_line=False)
@@ -199,6 +199,15 @@ class CodeTest(unittest.TestCase):
d.Append('And this.')
c.Concat(d, new_line=False)
self.assertEquals('This is a line.This too.And this.', c.Render())
+ c = Code()
+ c.Append('This is a')
+ c.Comment(' spectacular 80-character line thingy ' +
+ 'that fits wonderfully everywhere.',
+ comment_prefix='',
+ new_line=False)
+ self.assertEquals('This is a spectacular 80-character line thingy that ' +
+ 'fits wonderfully everywhere.',
+ c.Render())
if __name__ == '__main__':
unittest.main()

Powered by Google App Engine
This is Rietveld 408576698