summaryrefslogtreecommitdiffstats
path: root/Tests/FindPNG/Test/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/FindPNG/Test/main.c')
-rw-r--r--Tests/FindPNG/Test/main.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/FindPNG/Test/main.c b/Tests/FindPNG/Test/main.c
new file mode 100644
index 0000000..b33b28e
--- /dev/null
+++ b/Tests/FindPNG/Test/main.c
@@ -0,0 +1,18 @@
+#include <assert.h>
+#include <png.h>
+#include <string.h>
+
+int main()
+{
+ png_uint_32 png_version;
+ char png_version_string[16];
+
+ png_version = png_access_version_number();
+
+ snprintf(png_version_string, 16, "%i.%i.%i", png_version / 10000,
+ (png_version % 10000) / 100, png_version % 100);
+
+ assert(strcmp(png_version_string, CMAKE_EXPECTED_PNG_VERSION) == 0);
+
+ return 0;
+}