swig/Examples/test-suite/c/li_boost_shared_ptr_runme.cxx
Vadim Zeitlin 7c6fb542d3 Convert li_boost_shared_ptr runtime test to C++ from C
It's simpler to write tests in C++ rather than C and checking the
generated C++ API also checks the C API it uses underneath, so there is
no need to have both.
2021-11-23 01:29:26 +01:00

15 lines
391 B
C++

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