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).
This commit is contained in:
parent
d77e5d8b0e
commit
e78c8f39ed
12 changed files with 132 additions and 12 deletions
16
Examples/test-suite/c/cpp11_shared_ptr_const_runme.c
Normal file
16
Examples/test-suite/c/cpp11_shared_ptr_const_runme.c
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#include "cpp11_shared_ptr_const_wrap.h"
|
||||
#include <assert.h>
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
Foo* f;
|
||||
Foo* f2;
|
||||
|
||||
f = Foo_new(17);
|
||||
assert(Foo_get_m(f) == 17);
|
||||
f2 = cpp11_shared_ptr_const_foo(f);
|
||||
assert(Foo_get_m(f2) == 17);
|
||||
Foo_delete(f2);
|
||||
Foo_delete(f);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue