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

Unified Diff: PRESUBMIT_test.py

Issue 11418128: PRESUBMIT #include check enhancement: <sys/..> includes can be in any order. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review (maruel) Created 8 years, 1 month 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.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT_test.py
diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py
index 80c17567587099720a85849675a168ba72b9de5a..183ec6e54c839f71ad98827228ce195faa71819e 100755
--- a/PRESUBMIT_test.py
+++ b/PRESUBMIT_test.py
@@ -175,6 +175,16 @@ class IncludeOrderTest(unittest.TestCase):
mock_input_api, mock_file, True, range(1, len(contents) + 1))
self.assertEqual(0, len(warnings))
+ def testSysIncludes(self):
+ # #include <sys/...>'s can appear in any order.
+ mock_input_api = MockInputApi()
+ contents = ['#include <sys/b.h>',
+ '#include <sys/a.h>']
+ mock_file = MockFile('', contents)
+ warnings = PRESUBMIT._CheckIncludeOrderInFile(
+ mock_input_api, mock_file, True, range(1, len(contents) + 1))
+ self.assertEqual(0, len(warnings))
+
class VersionControlerConflictsTest(unittest.TestCase):
def testTypicalConflict(self):
« no previous file with comments | « PRESUBMIT.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698