diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/frameworks/16 sdl2/sdl2prog.c | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/frameworks/16 sdl2/sdl2prog.c')
-rw-r--r-- | meson/test cases/frameworks/16 sdl2/sdl2prog.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/meson/test cases/frameworks/16 sdl2/sdl2prog.c b/meson/test cases/frameworks/16 sdl2/sdl2prog.c new file mode 100644 index 000000000..b67aab4f2 --- /dev/null +++ b/meson/test cases/frameworks/16 sdl2/sdl2prog.c @@ -0,0 +1,33 @@ +/* vim: set sts=4 sw=4 et : */ + +#include <stdio.h> +#include <SDL_version.h> + +int main(int argc, char *argv[]) { + SDL_version compiled; + SDL_version linked; + + SDL_VERSION(&compiled); + SDL_GetVersion(&linked); + + if (compiled.major != linked.major) { + fprintf(stderr, "Compiled major '%u' != linked major '%u'", + compiled.major, linked.major); + return -1; + } + + if (compiled.minor != linked.minor) { + fprintf(stderr, "Compiled minor '%u' != linked minor '%u'", + compiled.minor, linked.minor); + return -2; + } +#if 0 + /* Disabled because sometimes this is 'micro' and sometimes 'patch' */ + if (compiled.micro != linked.micro) { + fprintf(stderr, "Compiled micro '%u' != linked micro '%u'", + compiled.micro, linked.micro); + return -3; + } +#endif + return 0; +} |