| Index: PRESUBMIT_test.py
|
| diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py
|
| index a8bbc8088b14f56a8f43c5a64f5b5b23631fc0f6..979ad892f1a58278ef1f248fd462ffc67b7824ee 100755
|
| --- a/PRESUBMIT_test.py
|
| +++ b/PRESUBMIT_test.py
|
| @@ -252,6 +252,40 @@ class IncludeOrderTest(unittest.TestCase):
|
| self.assertEqual(1, len(warnings[0].items))
|
| self.assertEqual('notify', warnings[0].type)
|
|
|
| + def testUncheckableIncludes(self):
|
| + mock_input_api = MockInputApi()
|
| + contents = ['#include <windows.h>',
|
| + '#include "b.h"'
|
| + '#include "a.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 "gpu/command_buffer/gles_autogen.h"',
|
| + '#include "b.h"'
|
| + '#include "a.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 "gl_mock_autogen.h"',
|
| + '#include "b.h"'
|
| + '#include "a.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 "ipc/some_macros.h"',
|
| + '#include "b.h"'
|
| + '#include "a.h"']
|
| + mock_file = MockFile('', contents)
|
| + warnings = PRESUBMIT._CheckIncludeOrderInFile(
|
| + mock_input_api, mock_file, range(1, len(contents) + 1))
|
| + self.assertEqual(0, len(warnings))
|
| +
|
|
|
| class VersionControlerConflictsTest(unittest.TestCase):
|
| def testTypicalConflict(self):
|
|
|