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

Unified Diff: tools/checkdeps/checkdeps_test.py

Issue 10823271: Add ability to write include rules specific to subsets of files in a directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/checkdeps/checkdeps.py ('k') | tools/checkdeps/cpp_checker.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/checkdeps/checkdeps_test.py
diff --git a/tools/checkdeps/checkdeps_test.py b/tools/checkdeps/checkdeps_test.py
index 0729a8f3a4032e29f30fbf1e35096fe24d409848..25db69408fc3613221ae896b0111eeefc5bfb9ff 100755
--- a/tools/checkdeps/checkdeps_test.py
+++ b/tools/checkdeps/checkdeps_test.py
@@ -24,7 +24,7 @@ class CheckDepsTest(unittest.TestCase):
os.path.join(self.deps_checker.base_directory,
'tools/checkdeps/testdata'))
problems = self.deps_checker.results_formatter.GetResults()
- self.failUnlessEqual(3, len(problems))
+ self.failUnlessEqual(4, len(problems))
def VerifySubstringsInProblems(key_path, substrings_in_sequence):
found = False
@@ -34,7 +34,7 @@ class CheckDepsTest(unittest.TestCase):
if index != -1:
for substring in substrings_in_sequence:
index = problem.find(substring, index + 1)
- self.failUnless(index != -1)
+ self.failUnless(index != -1, '%s in %s' % (substring, problem))
found = True
break
if not found:
@@ -52,6 +52,8 @@ class CheckDepsTest(unittest.TestCase):
['-third_party/explicitly_disallowed',
'Because of no rule applying',
'Because of no rule applying'])
+ VerifySubstringsInProblems('allowed/not_a_test.cc',
+ ['-tools/checkdeps/testdata/disallowed'])
def testTempRulesGenerator(self):
self.deps_checker.results_formatter = results.TemporaryRulesFormatter()
@@ -61,7 +63,8 @@ class CheckDepsTest(unittest.TestCase):
temp_rules = self.deps_checker.results_formatter.GetResults()
expected = [u' "!third_party/explicitly_disallowed/bad.h",',
u' "!third_party/no_rule/bad.h",',
- u' "!tools/checkdeps/testdata/disallowed/bad.h",']
+ u' "!tools/checkdeps/testdata/disallowed/bad.h",',
+ u' "!tools/checkdeps/testdata/disallowed/teststuff/bad.h",']
self.failUnlessEqual(expected, temp_rules)
def testCheckAddedIncludesAllGood(self):
« no previous file with comments | « tools/checkdeps/checkdeps.py ('k') | tools/checkdeps/cpp_checker.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698