Add C implementation of test cpp_atomic_class_var_pub_member_class
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13414 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d276aec0d0
commit
dbd8d3aabd
2 changed files with 21 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ top_builddir = @top_builddir@/..
|
||||||
include $(srcdir)/../common.mk
|
include $(srcdir)/../common.mk
|
||||||
|
|
||||||
CPP_TEST_CASES += \
|
CPP_TEST_CASES += \
|
||||||
|
cpp_atomic_class_var_pub_member_class \
|
||||||
cpp_atomic_global_enum \
|
cpp_atomic_global_enum \
|
||||||
cpp_atomic_global_var_atom \
|
cpp_atomic_global_var_atom \
|
||||||
cpp_atomic_global_var_class \
|
cpp_atomic_global_var_class \
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
#include <assert.h>
|
||||||
|
#include "cpp_atomic_class_var_pub_member_class/cpp_atomic_class_var_pub_member_class_proxy.h"
|
||||||
|
|
||||||
|
int main(int argc, const char *argv[])
|
||||||
|
{
|
||||||
|
MyClass *mc;
|
||||||
|
MySecondClass *mc2;
|
||||||
|
|
||||||
|
mc2 = new_MySecondClass();
|
||||||
|
mc = new_MyClass();
|
||||||
|
|
||||||
|
assert(MySecondClass_myPubClassInstance_get(mc2));
|
||||||
|
MySecondClass_myPubClassInstance_set(mc2, mc);
|
||||||
|
assert(MySecondClass_myPubClassInstance_get(mc2));
|
||||||
|
|
||||||
|
delete_MyClass(mc);
|
||||||
|
delete_MySecondClass(mc2);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue