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

Unified Diff: PRESUBMIT_test.py

Issue 1501793003: Rename MOVE_ONLY_TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move-name: todos 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
« no previous file with comments | « PRESUBMIT.py ('k') | base/memory/scoped_ptr.h » ('j') | 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..6b83350e73c74954ccb6e2e5900cbbafd9cc92d8 100755
--- a/PRESUBMIT_test.py
+++ b/PRESUBMIT_test.py
@@ -416,45 +416,6 @@ class CheckSingletonInHeadersTest(unittest.TestCase):
self.assertEqual(0, len(warnings))
-class CheckBaseMacrosInHeadersTest(unittest.TestCase):
- def _make_h(self, macro, header, line_prefix=''):
- return ("""
-#include "base/%s.h"
-
-class Thing {
- private:
-%sDISALLOW_%s(Thing);
-};
-""" % (macro, line_prefix, header)).splitlines()
-
- def testBaseMacrosInHeadersBad(self):
- mock_input_api = MockInputApi()
- mock_input_api.files = [
- 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')),
- ]
- warnings = PRESUBMIT._CheckBaseMacrosInHeaders(mock_input_api,
- MockOutputApi())
- self.assertEqual(1, len(warnings))
- self.assertEqual(4, len(warnings[0].items))
-
- def testBaseMacrosInHeadersGood(self):
- mock_input_api = MockInputApi()
- mock_input_api.files = [
- 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', ' //')),
- ]
- warnings = PRESUBMIT._CheckBaseMacrosInHeaders(mock_input_api,
- MockOutputApi())
- self.assertEqual(0, len(warnings))
-
-
class InvalidOSMacroNamesTest(unittest.TestCase):
def testInvalidOSMacroNames(self):
lines = ['#if defined(OS_WINDOWS)',
« no previous file with comments | « PRESUBMIT.py ('k') | base/memory/scoped_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698