| 145 | } |
| 146 | |
| 147 | void function_match_args() const { |
| 148 | constexpr char xmldata[] = "<?xml version=\"1.0\"?>\n" |
| 149 | "<def>\n" |
| 150 | " <function name=\"foo\">\n" |
| 151 | " <arg nr=\"1\"/>" |
| 152 | " </function>\n" |
| 153 | "</def>"; |
| 154 | |
| 155 | TokenList tokenList(settingsDefault, Standards::Language::CPP); |
| 156 | const char code[] = "foo();"; // <- too few arguments, not library function |
| 157 | ASSERT(tokenList.createTokensFromString(code)); |
| 158 | Token::createMutualLinks(tokenList.front()->next(), tokenList.back()->previous()); |
| 159 | tokenList.createAst(); |
| 160 | |
| 161 | Library library; |
| 162 | ASSERT(LibraryHelper::loadxmldata(library, xmldata, sizeof(xmldata))); |
| 163 | ASSERT(library.isNotLibraryFunction(tokenList.front())); |
| 164 | } |
| 165 | |
| 166 | void function_match_args_default() const { |
| 167 | constexpr char xmldata[] = "<?xml version=\"1.0\"?>\n" |
nothing calls this directly
no test coverage detected