| 218 | } |
| 219 | |
| 220 | void function_match_var() const { |
| 221 | constexpr char xmldata[] = "<?xml version=\"1.0\"?>\n" |
| 222 | "<def>\n" |
| 223 | " <function name=\"foo\">\n" |
| 224 | " <arg nr=\"1\"/>" |
| 225 | " </function>\n" |
| 226 | "</def>"; |
| 227 | |
| 228 | const char code[] = "Fred foo(123);"; // <- Variable declaration, not library function |
| 229 | SimpleTokenList tokenList(code); |
| 230 | tokenList.front()->next()->astOperand1(tokenList.front()); |
| 231 | tokenList.front()->next()->varId(1); |
| 232 | |
| 233 | Library library; |
| 234 | ASSERT(LibraryHelper::loadxmldata(library, xmldata, sizeof(xmldata))); |
| 235 | ASSERT(library.isNotLibraryFunction(tokenList.front()->next())); |
| 236 | } |
| 237 | |
| 238 | void function_arg() const { |
| 239 | constexpr char xmldata[] = "<?xml version=\"1.0\"?>\n" |
nothing calls this directly
no test coverage detected