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

Unified Diff: PRESUBMIT_test.py

Issue 655693003: remove obsolete OVERRIDE/FINAL presubmit checks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 02a10c624672e67cd9fb1a6ee906b42fe72a0f44..edac74a711f2631dbed063e6a15d6dcb3959b6d6 100755
--- a/PRESUBMIT_test.py
+++ b/PRESUBMIT_test.py
@@ -413,66 +413,6 @@ class InvalidOSMacroNamesTest(unittest.TestCase):
self.assertEqual(0, len(errors))
-class InvalidOverideAndFinalTest(unittest.TestCase):
- def testValidOverrideConstructs(self):
- mock_input_api = MockInputApi()
- lines = ['foo1() override;',
- 'foo2() final;',
- '#DEFINE OVERRIDE_METHOD_OVERLOAD',
- '#DEFINE FINAL_METHOD',
- '#DEFINE OVERRIDE_OVERRIDE_SOMETHING',
- '#DEFINE SOMETHING_OVERRIDE_SOMETHING',
- '#DEFINE SOMETHING_SOMETHING_OVERRIDE',
- '#DEFINE FINAL_OVERRIDE_FINAL',
- '#DEFINE SOMETHING_OVERRIDE_FINAL',
- '#DEFINE OVERRIDE_OVERRIDE_OVERRIDE',
- '#endif // FINAL_METHOD',
- '#endif // OVERRIDE_METHOD_OVERLOAD']
- mock_file_h = MockFile('something.h', lines)
- mock_input_api.files = [mock_file_h]
- errors = PRESUBMIT._CheckForOverrideAndFinalRules(mock_input_api,
- MockOutputApi())
- self.assertEqual(0, len(errors))
-
- def testInvalidOverrideConstructsInHeaders(self):
- mock_input_api = MockInputApi()
- lines_cpp = ['foo2() FINAL;']
- lines_h = ['foo1() OVERRIDE;']
- mock_file_cpp = MockFile('something.cpp', lines_cpp)
- mock_file_h = MockFile('something.h', lines_h)
- mock_input_api.files = [mock_file_cpp, mock_file_h]
- errors = PRESUBMIT._CheckForOverrideAndFinalRules(mock_input_api,
- MockOutputApi())
- self.assertEqual(1, len(errors))
-
- def testInvalidOverrideConstructsInCpp(self):
- mock_input_api = MockInputApi()
- lines_cpp = ['foo2() FINAL;']
- mock_file_cpp = MockFile('something.cpp', lines_cpp)
- mock_input_api.files = [mock_file_cpp]
- errors = PRESUBMIT._CheckForOverrideAndFinalRules(mock_input_api,
- MockOutputApi())
- self.assertEqual(1, len(errors))
-
- def testInvalidOverrideConstructsInCc(self):
- mock_input_api = MockInputApi()
- lines_cc = ['foo3() override FINAL;']
- mock_file_cc = MockFile('something.cc', lines_cc)
- mock_input_api.files = [mock_file_cc]
- errors = PRESUBMIT._CheckForOverrideAndFinalRules(mock_input_api,
- MockOutputApi())
- self.assertEqual(1, len(errors))
-
- def testInvalidOverrideConstructsInMm(self):
- mock_input_api = MockInputApi()
- lines_mm = ['foo4() OVERRIDE final;']
- mock_file_mm = MockFile('something.mm', lines_mm)
- mock_input_api.files = [mock_file_mm]
- errors = PRESUBMIT._CheckForOverrideAndFinalRules(mock_input_api,
- MockOutputApi())
- self.assertEqual(1, len(errors))
-
-
class InvalidIfDefinedMacroNamesTest(unittest.TestCase):
def testInvalidIfDefinedMacroNames(self):
lines = ['#if defined(TARGET_IPHONE_SIMULATOR)',
« 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