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

Unified Diff: tests/presubmit_unittest.py

Issue 100163002: Allow obj-c import statements to be as long as necessary. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: The alphabet is confusing. Sort correctly. Created 7 years 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 | « presubmit_canned_checks.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/presubmit_unittest.py
diff --git a/tests/presubmit_unittest.py b/tests/presubmit_unittest.py
index 6bdc76fe1d5b063acc6ee8f31bd1e66feacbaa21..3d2c75e98278aff85833675bfea41bc456a917b5 100755
--- a/tests/presubmit_unittest.py
+++ b/tests/presubmit_unittest.py
@@ -2071,6 +2071,12 @@ class CannedChecksUnittest(PresubmitTestsBase):
'importSomething ' + 'A ' * 50, 'foo.java',
presubmit.OutputApi.PresubmitPromptWarning)
+ def testCannedCheckObjCExceptionLongLines(self):
+ check = lambda x, y, _: presubmit_canned_checks.CheckLongLines(x, y, 80)
+ self.ContentTest(check, '#import ' + 'A ' * 150, 'foo.mm',
+ 'import' + 'A ' * 150, 'foo.mm',
+ presubmit.OutputApi.PresubmitPromptWarning)
+
def testCannedCheckMakefileLongLines(self):
check = lambda x, y, _: presubmit_canned_checks.CheckLongLines(x, y, 80)
self.ContentTest(check, 'A ' * 100, 'foo.mk', 'A ' * 100 + 'B', 'foo.mk',
@@ -2081,15 +2087,14 @@ class CannedChecksUnittest(PresubmitTestsBase):
self.ContentTest(check, '012345678\n', None, '0123456789\n', None,
presubmit.OutputApi.PresubmitPromptWarning)
- def testCannedCheckLongLinesMacro(self):
+ def testCannedCheckCppExceptionLongLines(self):
check = lambda x, y, z: presubmit_canned_checks.CheckLongLines(x, y, 10, z)
self.ContentTest(
check,
- # Put a space in so it doesn't trigger long symbols. Allow 1/3 more.
- '#if 56 89 12 45',
- None,
- '#if 56 89 12 456',
- None,
+ '#if 56 89 12 45 9191919191919',
+ 'foo.cc',
+ '#nif 56 89 12 45 9191919191919',
+ 'foo.cc',
presubmit.OutputApi.PresubmitPromptWarning)
def testCannedCheckLongLinesHttp(self):
« no previous file with comments | « presubmit_canned_checks.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698