summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Middelschulte <leif.middelschulte@gmail.com>2012-07-26 20:21:35 +0000
committerLeif Middelschulte <leif.middelschulte@gmail.com>2012-07-26 20:21:35 +0000
commitcfc1a71b719eabb29d15aea0bee1cddfaf18bfd8 (patch)
tree6cd7c427148607a0c8f1b323e7c5acb6873f84ea
parent244e3370dd0b84b66c2f184b227e94382a0c3a4e (diff)
downloadswig-cfc1a71b719eabb29d15aea0bee1cddfaf18bfd8.tar.gz
Add C implementation of test cpp_atomic_global_enum
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13412 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r--Examples/test-suite/c/Makefile.in1
-rw-r--r--Examples/test-suite/c/cpp_atomic_global_enum_runme.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/Examples/test-suite/c/Makefile.in b/Examples/test-suite/c/Makefile.in
index 5b4977216..1ff61ffd9 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_enum \
cpp_atomic_global_var_atom \
cpp_atomic_global_var_class \
cpp_atomic_namespaced_class
diff --git a/Examples/test-suite/c/cpp_atomic_global_enum_runme.c b/Examples/test-suite/c/cpp_atomic_global_enum_runme.c
new file mode 100644
index 000000000..a4bdf55be
--- /dev/null
+++ b/Examples/test-suite/c/cpp_atomic_global_enum_runme.c
@@ -0,0 +1,11 @@
+#include <assert.h>
+#include "cpp_atomic_global_enum/cpp_atomic_global_enum_proxy.h"
+
+int main(int argc, const char *argv[])
+{
+ enum SomeEnum myEnum = FIRST_VALUE;
+
+ assert(myEnum != SECOND_VALUE);
+
+ return 0;
+}