summaryrefslogtreecommitdiff
path: root/PRESUBMIT_test.py
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-09-26 13:24:57 +0100
committerTorne (Richard Coles) <torne@google.com>2013-09-26 13:24:57 +0100
commit68043e1e95eeb07d5cae7aca370b26518b0867d6 (patch)
treecc6a216bce6aa9319a216327b73a07f49200dab5 /PRESUBMIT_test.py
parentcede44592cfb9ec370925d10c2df733349a94a82 (diff)
downloadchromium_org-68043e1e95eeb07d5cae7aca370b26518b0867d6.tar.gz
Merge from Chromium at DEPS revision 225410
This commit was generated by merge_to_master.py. Change-Id: Ifa1539ca216abb163295ee7a77f81bb67f52e178
Diffstat (limited to 'PRESUBMIT_test.py')
-rwxr-xr-xPRESUBMIT_test.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py
index 1f4a1efe7e..63500a5de7 100755
--- a/PRESUBMIT_test.py
+++ b/PRESUBMIT_test.py
@@ -229,7 +229,7 @@ class IncludeOrderTest(unittest.TestCase):
mock_input_api, mock_file, range(1, len(contents) + 1))
self.assertEqual(0, len(warnings))
- def testSysIncludes(self):
+ def testExcludedIncludes(self):
# #include <sys/...>'s can appear in any order.
mock_input_api = MockInputApi()
contents = ['#include <sys/b.h>',
@@ -239,6 +239,20 @@ class IncludeOrderTest(unittest.TestCase):
mock_input_api, mock_file, range(1, len(contents) + 1))
self.assertEqual(0, len(warnings))
+ contents = ['#include <atlbase.h>',
+ '#include <aaa.h>']
+ mock_file = MockFile('', contents)
+ warnings = PRESUBMIT._CheckIncludeOrderInFile(
+ mock_input_api, mock_file, range(1, len(contents) + 1))
+ self.assertEqual(0, len(warnings))
+
+ contents = ['#include "build/build_config.h"',
+ '#include "aaa.h"']
+ mock_file = MockFile('', contents)
+ warnings = PRESUBMIT._CheckIncludeOrderInFile(
+ mock_input_api, mock_file, range(1, len(contents) + 1))
+ self.assertEqual(0, len(warnings))
+
def testCheckOnlyCFiles(self):
mock_input_api = MockInputApi()
mock_output_api = MockOutputApi()