Igor Opaniuk | f1f3fd0 | 2017-09-14 15:34:56 +0300 | [diff] [blame^] | 1 | #include <yaml.h> |
| 2 | |
| 3 | #include <stdlib.h> |
| 4 | #include <stdio.h> |
| 5 | |
| 6 | #ifdef NDEBUG |
| 7 | #undef NDEBUG |
| 8 | #endif |
| 9 | #include <assert.h> |
| 10 | |
| 11 | int |
| 12 | main(void) |
| 13 | { |
| 14 | int major = -1; |
| 15 | int minor = -1; |
| 16 | int patch = -1; |
| 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); |
| 22 | |
| 23 | /* Print structure sizes. */ |
| 24 | printf("sizeof(token) = %lu\n", sizeof(yaml_token_t)); |
| 25 | printf("sizeof(event) = %lu\n", sizeof(yaml_event_t)); |
| 26 | printf("sizeof(parser) = %lu\n", sizeof(yaml_parser_t)); |
| 27 | |
| 28 | return 0; |
| 29 | } |