diff options
author | Olly Betts <olly@survex.com> | 2022-10-13 08:09:13 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2022-10-13 08:09:13 +0100 |
commit | e123c2afe84ea29c5a7c9561c7e3355283001477 (patch) | |
tree | 7da36923371ff1c7fe916263da4182b1b7af4b32 | |
parent | c82aa3bb4123b3c06cce359e63019fff983e7ec0 (diff) | |
download | swig-e123c2afe84ea29c5a7c9561c7e3355283001477.tar.gz |
Additional SWIG_VERSION testing
-rw-r--r-- | Examples/test-suite/preproc_predefined.i | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Examples/test-suite/preproc_predefined.i b/Examples/test-suite/preproc_predefined.i index 63aab6c89..252ef9a1a 100644 --- a/Examples/test-suite/preproc_predefined.i +++ b/Examples/test-suite/preproc_predefined.i @@ -10,6 +10,18 @@ #endif %} +/* Test that SWIG_VERSION has a plausible value - in particular catch if + * it isn't defined to a numeric value (which will get replaced by 0). + */ +#if SWIG_VERSION < 0x040100 +# error SWIG_VERSION value not plausible at SWIG-time +#endif +%{ +#if SWIG_VERSION < 0x040100 +# error SWIG_VERSION value not plausible in the generated wrapper +#endif +%} + %define %generate_swig_version_from_preprocessor()%#define SWIG_VERSION_FROM_SWIG_PREPROCESSOR SWIG_VERSION %enddef %insert("header") { %generate_swig_version_from_preprocessor() |