Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py

Issue 478553002: Remove thirdparty/unittest2 from webkitpy and require python2.7. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # -*- coding: utf-8; -*- 1 # -*- coding: utf-8; -*-
2 # 2 #
3 # Copyright (C) 2011 Google Inc. All rights reserved. 3 # Copyright (C) 2011 Google Inc. All rights reserved.
4 # Copyright (C) 2009 Torch Mobile Inc. 4 # Copyright (C) 2009 Torch Mobile Inc.
5 # Copyright (C) 2009 Apple Inc. All rights reserved. 5 # Copyright (C) 2009 Apple Inc. All rights reserved.
6 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) 6 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
7 # 7 #
8 # Redistribution and use in source and binary forms, with or without 8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted provided that the following conditions are 9 # modification, are permitted provided that the following conditions are
10 # met: 10 # met:
(...skipping 20 matching lines...) Expand all
31 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 33
34 """Unit test for cpp_style.py.""" 34 """Unit test for cpp_style.py."""
35 35
36 # FIXME: Add a good test that tests UpdateIncludeState. 36 # FIXME: Add a good test that tests UpdateIncludeState.
37 37
38 import os 38 import os
39 import random 39 import random
40 import re 40 import re
41 import webkitpy.thirdparty.unittest2 as unittest 41 import unittest
42
42 import cpp as cpp_style 43 import cpp as cpp_style
43 from cpp import CppChecker 44 from cpp import CppChecker
44 from ..filter import FilterConfiguration 45 from ..filter import FilterConfiguration
45 from webkitpy.common.system.filesystem import FileSystem 46 from webkitpy.common.system.filesystem import FileSystem
46 47
47 # This class works as an error collector and replaces cpp_style.Error 48 # This class works as an error collector and replaces cpp_style.Error
48 # function for the unit tests. We also verify each category we see 49 # function for the unit tests. We also verify each category we see
49 # is in STYLE_CATEGORIES, to help keep that list up to date. 50 # is in STYLE_CATEGORIES, to help keep that list up to date.
50 class ErrorCollector: 51 class ErrorCollector:
51 _all_style_categories = CppChecker.categories 52 _all_style_categories = CppChecker.categories
(...skipping 5153 matching lines...) Expand 10 before | Expand all | Expand 10 after
5205 def test_ne(self): 5206 def test_ne(self):
5206 """Test __ne__ inequality function.""" 5207 """Test __ne__ inequality function."""
5207 checker1 = self._checker() 5208 checker1 = self._checker()
5208 checker2 = self._checker() 5209 checker2 = self._checker()
5209 5210
5210 # != calls __ne__. 5211 # != calls __ne__.
5211 # By default, __ne__ always returns true on different objects. 5212 # By default, __ne__ always returns true on different objects.
5212 # Thus, just check the distinguishing case to verify that the 5213 # Thus, just check the distinguishing case to verify that the
5213 # code defines __ne__. 5214 # code defines __ne__.
5214 self.assertFalse(checker1 != checker2) 5215 self.assertFalse(checker1 != checker2)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698