Chromium Code Reviews| Index: third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py |
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py |
| index 0c45578c16c6bacf8d85d86184a03cc42dc8f7a2..71fec729d1e25374fb95979af3da5c64e2c0dcbc 100644 |
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py |
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py |
| @@ -210,7 +210,9 @@ class CppFunctionsTest(unittest.TestCase): |
| expected_parameters = ({'type': 'PassRefPtr<MyClass>', 'name': 'paramName', 'row': 0}, |
| {'type': 'const Other1Class&', 'name': 'foo', 'row': 1}, |
| - {'type': 'const ComplexTemplate<Class1, NestedTemplate<P1, P2> >* const *', 'name': 'param', 'row': 2}, |
| + {'type': 'const ComplexTemplate<Class1, NestedTemplate<P1, P2> >* const *', |
| + 'name': 'param', |
| + 'row': 2}, |
| {'type': 'int*', 'name': 'myCount', 'row': 3}) |
| index = 0 |
| for parameter in cpp_style.parameter_list(elided_lines, start_position, end_position): |
| @@ -230,6 +232,7 @@ class CppFunctionsTest(unittest.TestCase): |
| class CppStyleTestBase(unittest.TestCase): |
| + |
| """Provides some useful helper functions for cpp_style tests. |
| Attributes: |
| @@ -586,7 +589,8 @@ class FunctionDetectionTest(CppStyleTestBase): |
| # Some parameter type with modifiers and no parameter names. |
| function_state = self.perform_function_detection( |
| - ['virtual void determineARIADropEffects(Vector<String>*&, const unsigned long int*&, const MediaPlayer::Preload, Other<Other2, Other3<P1, P2> >, int);'], |
| + [ |
| + 'virtual void determineARIADropEffects(Vector<String>*&, const unsigned long int*&, const MediaPlayer::Preload, Other<Other2, Other3<P1, P2> >, int);'], |
|
qyearsley
2016/05/27 16:06:03
In cases like this, the formatting could be made b
|
| {'name': 'determineARIADropEffects', |
| 'modifiers_and_return_type': 'virtual void', |
| 'parameter_start_position': (0, 37), |
| @@ -810,7 +814,7 @@ class CppStyleTest(CppStyleTestBase): |
| # We cannot test this functionality because of difference of |
| # function definitions. Anyway, we may never enable this. |
| # |
| - # # Test for unnamed arguments in a method. |
| + # Test for unnamed arguments in a method. |
| # def test_check_for_unnamed_params(self): |
| # message = ('All parameters should be named in a function' |
| # ' [readability/function] [3]') |
| @@ -833,8 +837,8 @@ class CppStyleTest(CppStyleTestBase): |
| # self.assert_lint('static void operator delete[](void* x) throw();', '') |
| # self.assert_lint('static void operator delete[](void* /*x*/) throw();', '') |
| # |
| - # # This one should technically warn, but doesn't because the function |
| - # # pointer is confusing. |
| + # This one should technically warn, but doesn't because the function |
| + # pointer is confusing. |
| # self.assert_lint('virtual void E(void (*fn)(int* p));', '') |
| # Test deprecated casts such as int(d) |
| @@ -3771,6 +3775,7 @@ class LeakyPatternTest(CppStyleTestBase): |
| class WebKitStyleTest(CppStyleTestBase): |
| # for http://webkit.org/coding/coding-style.html |
| + |
| def test_indentation(self): |
| # 1. Use spaces, not tabs. Tabs should only appear in files that |
| # require them for semantic meaning, like Makefiles. |
| @@ -4158,7 +4163,7 @@ class WebKitStyleTest(CppStyleTestBase): |
| 'Extra space after ( in if [whitespace/parens] [5]') |
| # FIXME: currently we only check first conditional, so we cannot detect errors in next ones. |
| # self.assert_multi_line_lint( |
| - # '#define TEST_ASSERT(expression) do { if (!(expression)) { TestsController::shared().testFailed(__FILE__, __LINE__, #expression); return; } } while (0 )\n', |
| + # '#define TEST_ASSERT(expression) do { if (!(expression)) { TestsController::shared().testFailed(__FILE__, __LINE__, #expression); return; } } while (0 )\n', |
| # 'Mismatching spaces inside () in if [whitespace/parens] [5]') |
| self.assert_multi_line_lint( |
| 'WTF_MAKE_NONCOPYABLE(ClassName); WTF_MAKE_FAST_ALLOCATED;\n', |