]> andersk Git - libyaml.git/blame - tests/test-version.c
Fixed most compiler warnings -Wall -Wextra
[libyaml.git] / tests / test-version.c
CommitLineData
5eff53a4 1#include <yaml.h>
cec6fc98
KS
2
3#include <stdlib.h>
4#include <stdio.h>
01224901
KS
5
6#ifdef NDEBUG
7#undef NDEBUG
8#endif
cec6fc98
KS
9#include <assert.h>
10
11int
12main(void)
13{
721c1923
KS
14 int major = -1;
15 int minor = -1;
16 int patch = -1;
cec6fc98
KS
17 char buf[64];
18
19 yaml_get_version(&major, &minor, &patch);
20 sprintf(buf, "%d.%d.%d", major, minor, patch);
21 assert(strcmp(buf, yaml_get_version_string()) == 0);
cec6fc98 22
625fcfe9 23 /* Print structure sizes. */
fc2dd942
RU
24 printf("sizeof(token) = %ld\n", (long)sizeof(yaml_token_t));
25 printf("sizeof(event) = %ld\n", (long)sizeof(yaml_event_t));
26 printf("sizeof(parser) = %ld\n", (long)sizeof(yaml_parser_t));
625fcfe9 27
cec6fc98
KS
28 return 0;
29}
This page took 0.044058 seconds and 5 git commands to generate.