MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / resource

Method resource

test/testlibrary.cpp:708–723  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

706 }
707
708 void resource() const {
709 constexpr char xmldata[] = "<?xml version=\"1.0\"?>\n"
710 "<def>\n"
711 " <resource>\n"
712 " <alloc>CreateX</alloc>\n"
713 " <dealloc>DeleteX</dealloc>\n"
714 " </resource>\n"
715 "</def>";
716
717 Library library;
718 ASSERT(LibraryHelper::loadxmldata(library, xmldata, sizeof(xmldata)));
719 ASSERT(library.functions().empty());
720
721 ASSERT(Library::isresource(library.allocId("CreateX")));
722 ASSERT_EQUALS(library.allocId("CreateX"), library.deallocId("DeleteX"));
723 }
724
725 void podtype() const {
726 {

Callers

nothing calls this directly

Calls 4

isresourceFunction · 0.85
allocIdMethod · 0.80
deallocIdMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected