Index: PRESUBMIT_test.py |
diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py |
index 1f4a1efe7e681b1760bd3a2fff10d22108266759..63500a5de7b8bf647ca2606e0767fe44e521c321 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() |