Changeset 107522 in webkit


Ignore:
Timestamp:
Feb 12, 2012 7:15:50 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Add toText and isTextNode helpers in Text class.
https://bugs.webkit.org/show_bug.cgi?id=78140

Unit test case for the new style checker introduced.

Patch by Joe Thomas <joethomas@motorola.com> on 2012-02-12
Reviewed by Adam Barth.

  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(CppStyleTest):
(CppStyleTest.test_static_cast_readability): Added a unit test case.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r107521 r107522  
     12012-02-12  Joe Thomas  <joethomas@motorola.com>
     2
     3        Add toText and isTextNode helpers in Text class.
     4        https://bugs.webkit.org/show_bug.cgi?id=78140
     5
     6        Unit test case for the new style checker introduced.
     7
     8        Reviewed by Adam Barth.
     9
     10        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
     11        (CppStyleTest):
     12        (CppStyleTest.test_static_cast_readability): Added a unit test case.
     13
    1142012-02-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    215
  • trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py

    r105652 r107522  
    759759        self.assert_language_rules_check('foo.cpp', statement, error_message)
    760760        self.assert_language_rules_check('foo.h', statement, error_message)
     761
     762    # Test for static_cast readability.
     763    def test_static_cast_readability(self):
     764        self.assert_lint(
     765            'Text* x = static_cast<Text*>(foo);',
     766            'Consider using toText helper function in WebCore/dom/Text.h '
     767            'instead of static_cast<Text*>'
     768            '  [readability/check] [4]')
    761769
    762770    # We cannot test this functionality because of difference of
Note: See TracChangeset for help on using the changeset viewer.