|
Lines 789-795
class CppStyleTest(CppStyleTestBase):
a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py_sec1
|
| 789 |
'int a = int(); // Constructor, o.k.', |
789 |
'int a = int(); // Constructor, o.k.', |
| 790 |
'') |
790 |
'') |
| 791 |
self.assert_lint( |
791 |
self.assert_lint( |
| 792 |
'X::X() : a(int()) {} // default Constructor, o.k.', |
792 |
'X::X() : a(int()) { } // default Constructor, o.k.', |
| 793 |
'') |
793 |
'') |
| 794 |
self.assert_lint( |
794 |
self.assert_lint( |
| 795 |
'operator bool(); // Conversion operator, o.k.', |
795 |
'operator bool(); // Conversion operator, o.k.', |
|
Lines 1601-1606
class CppStyleTest(CppStyleTestBase):
a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py_sec2
|
| 1601 |
self.assert_lint('for {', '') |
1601 |
self.assert_lint('for {', '') |
| 1602 |
self.assert_lint('EXPECT_DEBUG_DEATH({', '') |
1602 |
self.assert_lint('EXPECT_DEBUG_DEATH({', '') |
| 1603 |
|
1603 |
|
|
|
1604 |
def test_spacing_between_braces(self): |
| 1605 |
self.assert_lint(' { }', '') |
| 1606 |
self.assert_lint(' {}', 'Missing space inside { }. [whitespace/braces] [5]') |
| 1607 |
self.assert_lint(' { }', 'Too many spaces inside { }. [whitespace/braces] [5]') |
| 1608 |
|
| 1604 |
def test_spacing_around_else(self): |
1609 |
def test_spacing_around_else(self): |
| 1605 |
self.assert_lint('}else {', 'Missing space before else' |
1610 |
self.assert_lint('}else {', 'Missing space before else' |
| 1606 |
' [whitespace/braces] [5]') |
1611 |
' [whitespace/braces] [5]') |
|
Lines 1749-1755
class CppStyleTest(CppStyleTestBase):
a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py_sec3
|
| 1749 |
self.assert_lint('string EmptyString() { return ""; }', '') |
1754 |
self.assert_lint('string EmptyString() { return ""; }', '') |
| 1750 |
self.assert_lint('string EmptyString () { return ""; }', '') |
1755 |
self.assert_lint('string EmptyString () { return ""; }', '') |
| 1751 |
self.assert_lint('string VeryLongNameFunctionSometimesEndsWith(\n' |
1756 |
self.assert_lint('string VeryLongNameFunctionSometimesEndsWith(\n' |
| 1752 |
' VeryLongNameType veryLongNameVariable) {}', '') |
1757 |
' VeryLongNameType veryLongNameVariable) { }', '') |
| 1753 |
self.assert_lint('template<>\n' |
1758 |
self.assert_lint('template<>\n' |
| 1754 |
'string FunctionTemplateSpecialization<SomeType>(\n' |
1759 |
'string FunctionTemplateSpecialization<SomeType>(\n' |
| 1755 |
' int x) { return ""; }', '') |
1760 |
' int x) { return ""; }', '') |