Changeset 70600 in webkit


Ignore:
Timestamp:
Oct 26, 2010 7:01:07 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-10-26 Ademar de Souza Reis Jr. <Ademar Reis>

Reviewed by Dumitru Daniliuc.

check-webkit-style fails on operator+=, operator-=, ... methods
https://bugs.webkit.org/show_bug.cgi?id=48258

  • Scripts/webkitpy/style/checkers/cpp.py: Added exceptions
  • Scripts/webkitpy/style/checkers/cpp_unittest.py: Added unit-tests
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r70590 r70600  
     12010-10-26  Ademar de Souza Reis Jr.  <ademar.reis@openbossa.org>
     2
     3        Reviewed by Dumitru Daniliuc.
     4
     5        check-webkit-style fails on operator+=, operator-=, ... methods
     6        https://bugs.webkit.org/show_bug.cgi?id=48258
     7
     8        * Scripts/webkitpy/style/checkers/cpp.py: Added exceptions
     9        * Scripts/webkitpy/style/checkers/cpp_unittest.py: Added unit-tests
     10
    1112010-10-26  Ojan Vafai  <ojan@chromium.org>
    212
  • trunk/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py

    r69953 r70600  
    12941294
    12951295    # Don't try to do spacing checks for operator methods
    1296     line = sub(r'operator(==|!=|<|<<|<=|>=|>>|>)\(', 'operator\(', line)
     1296    line = sub(r'operator(==|!=|<|<<|<=|>=|>>|>|\+=|-=|\*=|/=|%=|&=|\|=|^=|<<=|>>=)\(', 'operator\(', line)
    12971297    # Don't try to do spacing checks for #include or #import statements at
    12981298    # minimum because it messes up checks for spacing around /
  • trunk/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py

    r69953 r70600  
    13141314                                    '')
    13151315
     1316    def test_operator_methods(self):
     1317        self.assert_lint('String operator+(const String&, const String&);', '')
     1318        self.assert_lint('bool operator==(const String&, const String&);', '')
     1319        self.assert_lint('String& operator-=(const String&, const String&);', '')
     1320        self.assert_lint('String& operator+=(const String&, const String&);', '')
     1321        self.assert_lint('String& operator*=(const String&, const String&);', '')
     1322        self.assert_lint('String& operator%=(const String&, const String&);', '')
     1323        self.assert_lint('String& operator&=(const String&, const String&);', '')
     1324        self.assert_lint('String& operator<<=(const String&, const String&);', '')
     1325        self.assert_lint('String& operator>>=(const String&, const String&);', '')
     1326        self.assert_lint('String& operator|=(const String&, const String&);', '')
     1327        self.assert_lint('String& operator^=(const String&, const String&);', '')
     1328
    13161329    def test_spacing_before_last_semicolon(self):
    13171330        self.assert_lint('call_function() ;',
Note: See TracChangeset for help on using the changeset viewer.