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

Method GetNamespaceResults

cpplint_unittest.py:283–292  ·  view source on GitHub ↗
(self, lines)

Source from the content-addressed store, hash-verified

281
282class TestCpplint(CpplintTestBase):
283 def GetNamespaceResults(self, lines):
284 error_collector = ErrorCollector(self.assertTrue)
285 cpplint.RemoveMultiLineComments("foo.h", lines, error_collector)
286 lines = cpplint.CleansedLines(lines)
287 nesting_state = cpplint.NestingState()
288 for i in range(lines.NumLines()):
289 nesting_state.Update("foo.h", lines, i, error_collector)
290 cpplint.CheckForNamespaceIndentation("foo.h", nesting_state, lines, i, error_collector)
291
292 return error_collector.Results()
293
294 def testForwardDeclarationNamespaceIndentation(self):
295 lines = ["namespace Test {", " class ForwardDeclaration;", "} // namespace Test"]

Calls 4

NumLinesMethod · 0.95
UpdateMethod · 0.95
ResultsMethod · 0.95
ErrorCollectorClass · 0.85

Tested by

no test coverage detected