Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: PRESUBMIT_test.py

Issue 105633012: Include order check should work better for files containing uncheckable includes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « PRESUBMIT.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT_test.py
diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py
index 1c7990ce898bb824b1b7068d7787826b9250a0d1..c6b280a64f5cf58ba48bcfa2de19b979bca4e63a 100755
--- a/PRESUBMIT_test.py
+++ b/PRESUBMIT_test.py
@@ -280,36 +280,36 @@ class IncludeOrderTest(unittest.TestCase):
def testUncheckableIncludes(self):
mock_input_api = MockInputApi()
contents = ['#include <windows.h>',
- '#include "b.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))
+ self.assertEqual(1, len(warnings))
contents = ['#include "gpu/command_buffer/gles_autogen.h"',
- '#include "b.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))
+ self.assertEqual(1, len(warnings))
contents = ['#include "gl_mock_autogen.h"',
- '#include "b.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))
+ self.assertEqual(1, len(warnings))
contents = ['#include "ipc/some_macros.h"',
- '#include "b.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))
+ self.assertEqual(1, len(warnings))
class VersionControlConflictsTest(unittest.TestCase):
« no previous file with comments | « PRESUBMIT.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698