swig/Examples/test-suite/c/li_boost_shared_ptr_runme.c
Vadim Zeitlin e78c8f39ed Add minimal shared_ptr support
Enable the tests and support of shared_ptr in them for C (which required
disabling a previously passing, because not doing anything, attributes
test which is currently broken for unrelated reasons).
2021-10-15 01:26:22 +02:00

17 lines
437 B
C

#include "li_boost_shared_ptr_wrap.h"
#include <assert.h>
#include <string.h>
int main(int argc, const char *argv[]) {
{
Klass* k = Klass_new_rcstd_string("me oh my");
assert( strcmp(Klass_getValue(k), "me oh my") == 0 );
Klass_delete(k);
}
{
Klass* k = li_boost_shared_ptr_factorycreate();
assert( strcmp(Klass_getValue(k), "factorycreate") == 0 );
Klass_delete(k);
}
}