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

Method testStruct

cpplint_unittest.py:6888–6900  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6886 assert len(self.nesting_state.stack) == 0
6887
6888 def testStruct(self):
6889 self.UpdateWithLines(["struct A {"])
6890 assert len(self.nesting_state.stack) == 1
6891 assert isinstance(self.nesting_state.stack[0], cpplint._ClassInfo)
6892 assert self.nesting_state.stack[0].name == "A"
6893 assert not self.nesting_state.stack[0].is_derived
6894
6895 self.UpdateWithLines(["}", "void Func(struct B arg) {"])
6896 assert len(self.nesting_state.stack) == 1
6897 assert not isinstance(self.nesting_state.stack[0], cpplint._ClassInfo)
6898
6899 self.UpdateWithLines(["}"])
6900 assert len(self.nesting_state.stack) == 0
6901
6902 def testPreprocessor(self):
6903 assert len(self.nesting_state.pp_stack) == 0

Callers

nothing calls this directly

Calls 1

UpdateWithLinesMethod · 0.95

Tested by

no test coverage detected