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

Unified Diff: tools/json_schema_compiler/code_test.py

Issue 1010603007: [Extension API Extern Generation] Fix comment indentation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 ca3652420f9018e391e2eca1f1b0f0ec9f6f13b4..fd55ad21bde04cb373ceed7ff7963a2662409f8b 100755
--- a/tools/json_schema_compiler/code_test.py
+++ b/tools/json_schema_compiler/code_test.py
@@ -148,6 +148,14 @@ class CodeTest(unittest.TestCase):
'// ' + 'x' * 77 + '\n'
'// ' + 'x' * 23,
c.Render())
+ c = Code(indent_size=2, comment_length=40)
+ c.Comment('Pretend this is a Closure Compiler style comment, which should '
+ 'both wrap and indent', comment_prefix=' * ', wrap_indent=4)
+ self.assertEquals(
+ ' * Pretend this is a Closure Compiler\n'
+ ' * style comment, which should both\n'
+ ' * wrap and indent',
+ c.Render())
def testCommentWithSpecialCharacters(self):
c = Code()

Powered by Google App Engine
This is Rietveld 408576698