summaryrefslogtreecommitdiffstats
path: root/PRESUBMIT_test.py
diff options
context:
space:
mode:
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 1f4a1ef..63500a5 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()