| 644 | } |
| 645 | |
| 646 | void memory() const { |
| 647 | constexpr char xmldata[] = "<?xml version=\"1.0\"?>\n" |
| 648 | "<def>\n" |
| 649 | " <memory>\n" |
| 650 | " <alloc>CreateX</alloc>\n" |
| 651 | " <dealloc>DeleteX</dealloc>\n" |
| 652 | " </memory>\n" |
| 653 | "</def>"; |
| 654 | |
| 655 | Library library; |
| 656 | ASSERT(LibraryHelper::loadxmldata(library, xmldata, sizeof(xmldata))); |
| 657 | ASSERT(library.functions().empty()); |
| 658 | |
| 659 | const Library::AllocFunc* af = library.getAllocFuncInfo("CreateX"); |
| 660 | ASSERT(af && af->arg == -1); |
| 661 | ASSERT(Library::ismemory(af)); |
| 662 | ASSERT_EQUALS(library.allocId("CreateX"), library.deallocId("DeleteX")); |
| 663 | const Library::AllocFunc* df = library.getDeallocFuncInfo("DeleteX"); |
| 664 | ASSERT(df && df->arg == 1); |
| 665 | } |
| 666 | void memory2() const { |
| 667 | constexpr char xmldata1[] = "<?xml version=\"1.0\"?>\n" |
| 668 | "<def>\n" |
nothing calls this directly
no test coverage detected