(self)
| 6858 | assert len(self.nesting_state.stack) == 0 |
| 6859 | |
| 6860 | def testClassAccess(self): |
| 6861 | self.UpdateWithLines(["class A {"]) |
| 6862 | assert len(self.nesting_state.stack) == 1 |
| 6863 | assert isinstance(self.nesting_state.stack[0], cpplint._ClassInfo) |
| 6864 | assert self.nesting_state.stack[0].access == "private" |
| 6865 | |
| 6866 | self.UpdateWithLines([" public:"]) |
| 6867 | assert self.nesting_state.stack[0].access == "public" |
| 6868 | self.UpdateWithLines([" protracted:"]) |
| 6869 | assert self.nesting_state.stack[0].access == "public" |
| 6870 | self.UpdateWithLines([" protected:"]) |
| 6871 | assert self.nesting_state.stack[0].access == "protected" |
| 6872 | self.UpdateWithLines([" private:"]) |
| 6873 | assert self.nesting_state.stack[0].access == "private" |
| 6874 | |
| 6875 | self.UpdateWithLines([" struct B {"]) |
| 6876 | assert len(self.nesting_state.stack) == 2 |
| 6877 | assert isinstance(self.nesting_state.stack[1], cpplint._ClassInfo) |
| 6878 | assert self.nesting_state.stack[1].access == "public" |
| 6879 | assert self.nesting_state.stack[0].access == "private" |
| 6880 | |
| 6881 | self.UpdateWithLines([" protected :"]) |
| 6882 | assert self.nesting_state.stack[1].access == "protected" |
| 6883 | assert self.nesting_state.stack[0].access == "private" |
| 6884 | |
| 6885 | self.UpdateWithLines([" }", "}"]) |
| 6886 | assert len(self.nesting_state.stack) == 0 |
| 6887 | |
| 6888 | def testStruct(self): |
| 6889 | self.UpdateWithLines(["struct A {"]) |
nothing calls this directly
no test coverage detected