(self)
| 5074 | cpplint._cpplint_state.filters = old_filters |
| 5075 | |
| 5076 | def testDuplicateHeader(self): |
| 5077 | error_collector = ErrorCollector(self.assertTrue) |
| 5078 | cpplint.ProcessFileData( |
| 5079 | "path/self.cc", |
| 5080 | "cc", |
| 5081 | [ |
| 5082 | "// Copyright 2014 Your Company. All Rights Reserved.", |
| 5083 | '#include "path/self.h"', |
| 5084 | '#include "path/duplicate.h"', |
| 5085 | '#include "path/duplicate.h"', |
| 5086 | "#ifdef MACRO", |
| 5087 | '#include "path/unique.h"', |
| 5088 | "#else", |
| 5089 | '#include "path/unique.h"', |
| 5090 | "#endif", |
| 5091 | "", |
| 5092 | ], |
| 5093 | error_collector, |
| 5094 | ) |
| 5095 | assert error_collector.ResultList() == [ |
| 5096 | '"path/duplicate.h" already included at path/self.cc:3 [build/include] [4]' |
| 5097 | ] |
| 5098 | |
| 5099 | def testUnnamedNamespacesInHeaders(self): |
| 5100 | for extension in ["h", "hpp", "hxx", "h++", "cuh"]: |
nothing calls this directly
no test coverage detected