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

Unified Diff: PRESUBMIT_test.py

Issue 1490383004: Make DISALLOW_* presubmit stricter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« PRESUBMIT.py ('K') | « 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 e488c944de4e6dee1bd6e4f32858f171124da0be..81d022f2a6e138bf54bbd6c2c1555b5023722968 100755
--- a/PRESUBMIT_test.py
+++ b/PRESUBMIT_test.py
@@ -433,12 +433,15 @@ class Thing {
MockAffectedFile('foo.h', self._make_h('not_macros', 'ASSIGN')),
MockAffectedFile('bar.h', self._make_h('not_macros', 'COPY')),
MockAffectedFile('baz.h', self._make_h('not_macros', 'COPY_AND_ASSIGN')),
- MockAffectedFile('qux.h', self._make_h('not_macros', 'EVIL')),
+ MockAffectedFile('qux.h', self._make_h('not_macros',
+ 'EVIL_CONSTRUCTORS')),
+ MockAffectedFile('quux.h', self._make_h('not_macros',
+ 'IMPLICIT_CONSTRUCTORS')),
]
warnings = PRESUBMIT._CheckBaseMacrosInHeaders(mock_input_api,
MockOutputApi())
self.assertEqual(1, len(warnings))
- self.assertEqual(4, len(warnings[0].items))
+ self.assertEqual(len(mock_input_api.files), len(warnings[0].items))
def testBaseMacrosInHeadersGood(self):
mock_input_api = MockInputApi()
@@ -446,9 +449,11 @@ class Thing {
MockAffectedFile('foo.h', self._make_h('macros', 'ASSIGN')),
MockAffectedFile('bar.h', self._make_h('macros', 'COPY')),
MockAffectedFile('baz.h', self._make_h('macros', 'COPY_AND_ASSIGN')),
- MockAffectedFile('qux.h', self._make_h('macros', 'EVIL')),
- MockAffectedFile('foz.h', self._make_h('not_macros', 'ASSIGN', '//')),
- MockAffectedFile('foz.h', self._make_h('not_macros', 'ASSIGN', ' //')),
+ MockAffectedFile('qux.h', self._make_h('macros', 'EVIL_CONSTRUCTORS')),
+ MockAffectedFile('quux.h', self._make_h('macros',
+ 'IMPLICIT_CONSTRUCTORS')),
+ MockAffectedFile('corge.h', self._make_h('not_macros', 'ASSIGN', '//')),
+ MockAffectedFile('grault.h', self._make_h('not_macros', 'ASSIGN', ' //')),
]
warnings = PRESUBMIT._CheckBaseMacrosInHeaders(mock_input_api,
MockOutputApi())
« PRESUBMIT.py ('K') | « PRESUBMIT.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698