summaryrefslogtreecommitdiffstats
path: root/Tests/FindJasper/Test/main.c
blob: 771344deab33851fd8dfcb9943b2b9dd2a261a89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <assert.h>
// clang-format off
#include <stdio.h>
#include <jasper/jasper.h>
// clang-format on

int main()
{
  /* Without any JPEG file to open, test that the call fails as
     expected.  This tests that linking worked. */
  jas_init();
  jas_image_t* img = jas_image_create0();
  jas_image_destroy(img);
  jas_cleanup();

  return (JAS_VERSION != CMAKE_EXPECTED_JASPER_VERSION);
}