diff options
author | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-20 12:16:30 +0000 |
---|---|---|
committer | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-20 12:16:30 +0000 |
commit | 23093b697d27854409f4fb5a762ed844cbbbf448 (patch) | |
tree | 9d726c863d8e088f93c3a4103554c03b63b7294c /PRESUBMIT_test.py | |
parent | d6f3b833519b812cef657df7fd0102e9e8f7b448 (diff) | |
download | chromium_src-23093b697d27854409f4fb5a762ed844cbbbf448.zip chromium_src-23093b697d27854409f4fb5a762ed844cbbbf448.tar.gz chromium_src-23093b697d27854409f4fb5a762ed844cbbbf448.tar.bz2 |
Exclude more files from the PRESUBMIT #include check.
These files need to be included out-of-order.
BUG=NONE
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/24177004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'PRESUBMIT_test.py')
-rwxr-xr-x | PRESUBMIT_test.py | 16 |
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() |