summaryrefslogtreecommitdiffstats
path: root/Tests/FindPNG/Test/main.c
blob: 06d943d1b554977828c4f2e11d41ce76255dd648 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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;
}