Changeset 160006 in webkit


Ignore:
Timestamp:
Dec 3, 2013 9:15:18 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Remove function from TextChecker
https://bugs.webkit.org/show_bug.cgi?id=125148

Patch by Tamas Gergely <tgergely.u-szeged@partner.samsung.com> on 2013-12-03
Reviewed by Darin Adler.

The process_file_data is used only from the unit tests, so it is simply moved there.

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

(TextChecker.check):

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

(TextStyleTestCase.process_file_data):
(TextStyleTestCase.assertNoError):
(TextStyleTestCase.assertError):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r159998 r160006  
     12013-12-03  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
     2
     3        Remove function from TextChecker
     4        https://bugs.webkit.org/show_bug.cgi?id=125148
     5
     6        Reviewed by Darin Adler.
     7
     8        The process_file_data is used only from the unit tests, so it is simply moved there.
     9
     10        * Scripts/webkitpy/style/checkers/text.py:
     11        (TextChecker.check):
     12        * Scripts/webkitpy/style/checkers/text_unittest.py:
     13        (TextStyleTestCase.process_file_data):
     14        (TextStyleTestCase.assertNoError):
     15        (TextStyleTestCase.assertError):
     16
    1172013-12-03  Dániel Bátyai  <Batyai.Daniel@stud.u-szeged.hu>
    218
  • trunk/Tools/Scripts/webkitpy/style/checkers/text.py

    r65308 r160006  
    4343    def check(self, lines):
    4444        self._tab_checker.check(lines)
    45 
    46 
    47 # FIXME: Remove this function (requires refactoring unit tests).
    48 def process_file_data(filename, lines, error):
    49     checker = TextChecker(filename, error)
    50     checker.check(lines)
    51 
  • trunk/Tools/Scripts/webkitpy/style/checkers/text_unittest.py

    r140510 r160006  
    3737    """TestCase for text_style.py"""
    3838
     39    def process_file_data(self, filename, lines, error):
     40        checker = TextChecker(filename, error)
     41        checker.check(lines)
     42
    3943    def assertNoError(self, lines):
    4044        """Asserts that the specified lines has no errors."""
     
    4549            self.had_error = True
    4650
    47         text_style.process_file_data('', lines, error_for_test)
     51        self.process_file_data('', lines, error_for_test)
    4852        self.assertFalse(self.had_error, '%s should not have any errors.' % lines)
    4953
     
    5862            self.had_error = True
    5963
    60         text_style.process_file_data('', lines, error_for_test)
     64        self.process_file_data('', lines, error_for_test)
    6165        self.assertTrue(self.had_error, '%s should have an error [whitespace/tab].' % lines)
    6266
Note: See TracChangeset for help on using the changeset viewer.