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.
15 lines
391 B
C++
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 );
|
|
}
|
|
}
|