From 7d3677a5c8ee5a23c86762167382f88ef328a73a Mon Sep 17 00:00:00 2001 From: Leif Middelschulte Date: Thu, 26 Jul 2012 20:21:03 +0000 Subject: [PATCH] Add C implementation of test cpp_atomic_global_var_atom git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13410 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/c/Makefile.in | 1 + .../test-suite/c/cpp_atomic_global_var_atom_runme.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 Examples/test-suite/c/cpp_atomic_global_var_atom_runme.c diff --git a/Examples/test-suite/c/Makefile.in b/Examples/test-suite/c/Makefile.in index 431ab806a..5b4977216 100644 --- a/Examples/test-suite/c/Makefile.in +++ b/Examples/test-suite/c/Makefile.in @@ -13,6 +13,7 @@ top_builddir = @top_builddir@/.. include $(srcdir)/../common.mk CPP_TEST_CASES += \ + cpp_atomic_global_var_atom \ cpp_atomic_global_var_class \ cpp_atomic_namespaced_class diff --git a/Examples/test-suite/c/cpp_atomic_global_var_atom_runme.c b/Examples/test-suite/c/cpp_atomic_global_var_atom_runme.c new file mode 100644 index 000000000..f21939cff --- /dev/null +++ b/Examples/test-suite/c/cpp_atomic_global_var_atom_runme.c @@ -0,0 +1,13 @@ +#include +#include "cpp_atomic_global_var_atom/cpp_atomic_global_var_atom_proxy.h" + +int main(int argc, const char *argv[]) +{ + assert(myGlobalInt == 42); + + myGlobalInt = 4711; + + assert(myGlobalInt == 4711); + + return 0; +}