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

Unified Diff: tools/json_schema_compiler/code_test.py

Issue 12181005: generated_api.h should have its body generated into generated_api.cc (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master Created 7 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
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..c3063a0d46753b8c0649d1ed08de98af6662cc11 100755
--- a/tools/json_schema_compiler/code_test.py
+++ b/tools/json_schema_compiler/code_test.py
@@ -161,5 +161,20 @@ class CodeTest(unittest.TestCase):
'// 20% of 80%s',
d.Render())
+ def testAdjustIndentLevel(self):
+ c = Code()
+ c.Sblock('sblock')
+ c.AdjustIndentLevel(-1)
+ c.Append('inner')
+ c.AdjustIndentLevel(1)
+ c.Append('moreinner')
+ c.Eblock('eblock')
+ self.assertEquals(
+ 'sblock\n'
+ ' inner\n'
+ ' moreinner\n'
+ 'eblock',
+ c.Render())
+
if __name__ == '__main__':
unittest.main()

Powered by Google App Engine
This is Rietveld 408576698