| 96 | #define check(...) check_(__FILE__, __LINE__, __VA_ARGS__) |
| 97 | template<size_t size> |
| 98 | void check_(const char* file, int line, const char (&code)[size], const CheckOptions& options = make_default_obj()) { |
| 99 | const Settings settings1 = settingsBuilder(settings).platform(options.platform).build(); |
| 100 | |
| 101 | SimpleTokenizer2 tokenizer(settings1, *this, code, "test.cpp"); |
| 102 | |
| 103 | // Tokenize.. |
| 104 | ASSERT_LOC(tokenizer.simplifyTokens1(""), file, line); |
| 105 | |
| 106 | // Check for unused private functions.. |
| 107 | CheckClassImpl checkClass(&tokenizer, settings1, *this); |
| 108 | checkClass.privateFunctions(); |
| 109 | } |
| 110 | |
| 111 | void test1() { |
| 112 | check("class Fred\n" |
nothing calls this directly
no test coverage detected