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

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

Issue 2715553002: Change all relative imports in webkitpy to absolute imports. (Closed)
Patch Set: Created 3 years, 9 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
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 22 matching lines...) Expand all
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 unittest 41 import unittest
42 42
43 import cpp as cpp_style
44 from cpp import CppChecker
45 from ..filter import FilterConfiguration
46 from webkitpy.common.system.filesystem import FileSystem 43 from webkitpy.common.system.filesystem import FileSystem
44 from webkitpy.style.checkers import cpp as cpp_style
45 from webkitpy.style.checkers.cpp import CppChecker
46 from webkitpy.style.filter import FilterConfiguration
47 47
48 # 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
49 # 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
50 # 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.
51 51
52 52
53 class ErrorCollector: 53 class ErrorCollector:
54 _all_style_categories = CppChecker.categories 54 _all_style_categories = CppChecker.categories
55 # This is a list including all categories seen in any unit test. 55 # This is a list including all categories seen in any unit test.
56 _seen_style_categories = {} 56 _seen_style_categories = {}
(...skipping 4078 matching lines...) Expand 10 before | Expand all | Expand 10 after
4135 def test_ne(self): 4135 def test_ne(self):
4136 """Test __ne__ inequality function.""" 4136 """Test __ne__ inequality function."""
4137 checker1 = self._checker() 4137 checker1 = self._checker()
4138 checker2 = self._checker() 4138 checker2 = self._checker()
4139 4139
4140 # != calls __ne__. 4140 # != calls __ne__.
4141 # By default, __ne__ always returns true on different objects. 4141 # By default, __ne__ always returns true on different objects.
4142 # Thus, just check the distinguishing case to verify that the 4142 # Thus, just check the distinguishing case to verify that the
4143 # code defines __ne__. 4143 # code defines __ne__.
4144 self.assertFalse(checker1 != checker2) 4144 self.assertFalse(checker1 != checker2)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698