Add C implementation of test cpp_atomic_class_var_pub_member_atom
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13416 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
cafa7e5995
commit
f24ce340ff
2 changed files with 16 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_atom \
|
||||||
cpp_atomic_class_var_pub_member_class \
|
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 \
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
#include <assert.h>
|
||||||
|
#include "cpp_atomic_class_var_pub_member_atom/cpp_atomic_class_var_pub_member_atom_proxy.h"
|
||||||
|
|
||||||
|
int main(int argc, const char *argv[])
|
||||||
|
{
|
||||||
|
MyClass *mc = new_MyClass();
|
||||||
|
|
||||||
|
assert(MyClass_myPubInt_get(mc) == 42);
|
||||||
|
MyClass_myPubInt_set(mc, 4711);
|
||||||
|
assert(MyClass_myPubInt_get(mc) == 4711);
|
||||||
|
|
||||||
|
delete_MyClass(mc);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue