Changeset 160167 in webkit


Ignore:
Timestamp:
Dec 5, 2013 4:00:50 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Remove duplicated/dead code from cpp style checker unit tests.
https://bugs.webkit.org/show_bug.cgi?id=125226

Patch by Tamas Gergely <tgergely.u-szeged@partner.samsung.com> on 2013-12-05
Reviewed by Ryosuke Niwa.

Remove the first definition of OrderOfIncludesTest class as it is
overwritten by the second. Remove a duplicated assert statement
from the second class.

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

(OrderOfIncludesTest.setUp):
(OrderOfIncludesTest.test_try_drop_common_suffixes):

The last assert was duplicated.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r160166 r160167  
     12013-12-05  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
     2
     3        Remove duplicated/dead code from cpp style checker unit tests.
     4        https://bugs.webkit.org/show_bug.cgi?id=125226
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Remove the first definition of OrderOfIncludesTest class as it is
     9        overwritten by the second. Remove a duplicated assert statement
     10        from the second class.
     11
     12        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
     13        (OrderOfIncludesTest.setUp):
     14        (OrderOfIncludesTest.test_try_drop_common_suffixes):
     15          The last assert was duplicated.
     16
    1172013-12-05  László Langó  <lango@inf.u-szeged.hu>
    218
  • trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py

    r160124 r160167  
    25342534        # Cheat os.path.abspath called in FileInfo class.
    25352535        self.os_path_abspath_orig = os.path.abspath
    2536         os.path.abspath = lambda value: value
    2537 
    2538     def tearDown(self):
    2539         os.path.abspath = self.os_path_abspath_orig
    2540 
    2541     def test_try_drop_common_suffixes(self):
    2542         self.assertEqual('foo/foo', cpp_style._drop_common_suffixes('foo/foo-inl.h'))
    2543         self.assertEqual('foo/bar/foo',
    2544                          cpp_style._drop_common_suffixes('foo/bar/foo_inl.h'))
    2545         self.assertEqual('foo/foo', cpp_style._drop_common_suffixes('foo/foo.cpp'))
    2546         self.assertEqual('foo/foo_unusualinternal',
    2547                          cpp_style._drop_common_suffixes('foo/foo_unusualinternal.h'))
    2548         self.assertEqual('',
    2549                          cpp_style._drop_common_suffixes('_test.cpp'))
    2550         self.assertEqual('test',
    2551                          cpp_style._drop_common_suffixes('test.cpp'))
    2552 
    2553 
    2554 class OrderOfIncludesTest(CppStyleTestBase):
    2555     def setUp(self):
    2556         self.include_state = cpp_style._IncludeState()
    2557 
    2558         # Cheat os.path.abspath called in FileInfo class.
    2559         self.os_path_abspath_orig = os.path.abspath
    25602536        self.os_path_isfile_orig = os.path.isfile
    25612537        os.path.abspath = lambda value: value
     
    28782854        self.assertEqual('test',
    28792855                         cpp_style._drop_common_suffixes('test.cpp'))
    2880         self.assertEqual('test',
    2881                          cpp_style._drop_common_suffixes('test.cpp'))
     2856
    28822857
    28832858class CheckForFunctionLengthsTest(CppStyleTestBase):
Note: See TracChangeset for help on using the changeset viewer.