(self)
| 4987 | cpplint._line_length = old_line_length |
| 4988 | |
| 4989 | def testFilter(self): |
| 4990 | old_filters = cpplint._cpplint_state.filters |
| 4991 | try: |
| 4992 | cpplint._cpplint_state.SetFilters("-,+whitespace,-whitespace/indent") |
| 4993 | self.TestLint( |
| 4994 | "// Hello there ", |
| 4995 | "Line ends in whitespace. Consider deleting these extra spaces." |
| 4996 | " [whitespace/end_of_line] [4]", |
| 4997 | ) |
| 4998 | self.TestLint("int a = (int)1.0;", "") |
| 4999 | self.TestLint(" weird opening space", "") |
| 5000 | finally: |
| 5001 | cpplint._cpplint_state.filters = old_filters |
| 5002 | |
| 5003 | def testDefaultFilter(self): |
| 5004 | default_filters = cpplint._DEFAULT_FILTERS |
nothing calls this directly
no test coverage detected