| 529 | } |
| 530 | |
| 531 | void function_namespace() const { |
| 532 | constexpr char xmldata[] = "<?xml version=\"1.0\"?>\n" |
| 533 | "<def>\n" |
| 534 | " <function name=\"Foo::foo,bar\">\n" |
| 535 | " <noreturn>false</noreturn>\n" |
| 536 | " </function>\n" |
| 537 | "</def>"; |
| 538 | |
| 539 | Library library; |
| 540 | ASSERT(LibraryHelper::loadxmldata(library, xmldata, sizeof(xmldata))); |
| 541 | ASSERT_EQUALS(library.functions().size(), 2U); |
| 542 | ASSERT(library.functions().at("Foo::foo").argumentChecks.empty()); |
| 543 | ASSERT(library.functions().at("bar").argumentChecks.empty()); |
| 544 | |
| 545 | { |
| 546 | const char code[] = "Foo::foo();"; |
| 547 | const SimpleTokenList tokenList(code); |
| 548 | ASSERT(library.isnotnoreturn(tokenList.front()->tokAt(2))); |
| 549 | } |
| 550 | |
| 551 | { |
| 552 | const char code[] = "bar();"; |
| 553 | const SimpleTokenList tokenList(code); |
| 554 | ASSERT(library.isnotnoreturn(tokenList.front())); |
| 555 | } |
| 556 | } |
| 557 | |
| 558 | void function_method() { |
| 559 | constexpr char xmldata[] = "<?xml version=\"1.0\"?>\n" |