From afaba27c9de59063e2f78bdaa69ac788c16b1ee3 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 7 Nov 2010 07:41:29 +0100 Subject: PCPP Test: Add ifndef tests --- test/junit/com/jogamp/gluegen/PCPPTest.java | 5 ++++- test/junit/com/jogamp/gluegen/pcpptest.h | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'test/junit/com/jogamp') diff --git a/test/junit/com/jogamp/gluegen/PCPPTest.java b/test/junit/com/jogamp/gluegen/PCPPTest.java index fc59f9a..70b6a84 100644 --- a/test/junit/com/jogamp/gluegen/PCPPTest.java +++ b/test/junit/com/jogamp/gluegen/PCPPTest.java @@ -65,7 +65,10 @@ public class PCPPTest { " cl_char GOOD_A;"+ " int GOOD_B;"+ " int GOOD_C;"+ - "# 40 \"pcpptest.h\""; + "# 40 \"pcpptest.h\""+ + "#54\"pcpptest.h\""+ + " int TEST_D_GOOD;"+ + "#60\"pcpptest.h\""; output.flush(); String result = output.toString(); diff --git a/test/junit/com/jogamp/gluegen/pcpptest.h b/test/junit/com/jogamp/gluegen/pcpptest.h index 5009d04..e52cc5c 100644 --- a/test/junit/com/jogamp/gluegen/pcpptest.h +++ b/test/junit/com/jogamp/gluegen/pcpptest.h @@ -37,3 +37,23 @@ cl_char TEST_A(2); int TEST_B; int TEST_C; +#ifndef __NO__ + #ifdef __YES__ + #ifdef CGDLL_EXPORTS + #define ERR_D_1 + #elif defined (CG_LIB) + #define ERR_D_2 + #else + #define GOOD_D + #endif + #else + #define ERR_D_3 + #endif +#endif + +#ifdef GOOD_D + int TEST_D_GOOD; +#elif + int TEST_D_ERROR; +#endif + -- cgit v1.2.3