MCPcopy Index your code
hub / github.com/cpplint/cpplint / VerifyAllCategoriesAreSeen

Method VerifyAllCategoriesAreSeen

cpplint_unittest.py:86–97  ·  view source on GitHub ↗

Fails if there's a category in _ERROR_CATEGORIES~_SEEN_ERROR_CATEGORIES. This should only be called after all tests are run, so _SEEN_ERROR_CATEGORIES has had a chance to fully populate. Since this isn't called from within the normal unittest framework, we can't use

(self)

Source from the content-addressed store, hash-verified

84 return self._errors
85
86 def VerifyAllCategoriesAreSeen(self):
87 """Fails if there's a category in _ERROR_CATEGORIES~_SEEN_ERROR_CATEGORIES.
88
89 This should only be called after all tests are run, so
90 _SEEN_ERROR_CATEGORIES has had a chance to fully populate. Since
91 this isn't called from within the normal unittest framework, we
92 can't use the normal unittest assert macros. Instead we just exit
93 when we see an error. Good thing this test is always run last!
94 """
95 for category in self._ERROR_CATEGORIES:
96 if category not in self._SEEN_ERROR_CATEGORIES:
97 sys.exit('FATAL ERROR: There are no tests for category "%s"' % category)
98
99 def RemoveIfPresent(self, substr):
100 for index, error in enumerate(self._errors):

Callers 1

run_around_testsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected