| 121 | } |
| 122 | |
| 123 | void function_match_scope() const { |
| 124 | constexpr char xmldata[] = "<?xml version=\"1.0\"?>\n" |
| 125 | "<def>\n" |
| 126 | " <function name=\"foo\">\n" |
| 127 | " <arg nr=\"1\"/>" |
| 128 | " </function>\n" |
| 129 | "</def>"; |
| 130 | |
| 131 | Library library; |
| 132 | ASSERT(LibraryHelper::loadxmldata(library, xmldata, sizeof(xmldata))); |
| 133 | { |
| 134 | const char code[] = "fred.foo(123);"; // <- wrong scope, not library function |
| 135 | const SimpleTokenList tokenList(code); |
| 136 | |
| 137 | ASSERT(library.isNotLibraryFunction(tokenList.front()->tokAt(2))); |
| 138 | } |
| 139 | { |
| 140 | const char code[] = "Fred::foo(123);"; // <- wrong scope, not library function |
| 141 | const SimpleTokenList tokenList(code); |
| 142 | |
| 143 | ASSERT(library.isNotLibraryFunction(tokenList.front()->tokAt(2))); |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | void function_match_args() const { |
| 148 | constexpr char xmldata[] = "<?xml version=\"1.0\"?>\n" |
nothing calls this directly
no test coverage detected