From 58daab21cd043e1dc37024a7f99b396788372918 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 9 Mar 2024 14:19:48 +0100 Subject: Merging upstream version 1.44.3. Signed-off-by: Daniel Baumann --- .../h2o/libh2o/deps/yaml/tests/test-version.c | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 web/server/h2o/libh2o/deps/yaml/tests/test-version.c (limited to 'web/server/h2o/libh2o/deps/yaml/tests/test-version.c') diff --git a/web/server/h2o/libh2o/deps/yaml/tests/test-version.c b/web/server/h2o/libh2o/deps/yaml/tests/test-version.c new file mode 100644 index 000000000..e3e4a1623 --- /dev/null +++ b/web/server/h2o/libh2o/deps/yaml/tests/test-version.c @@ -0,0 +1,29 @@ +#include + +#include +#include + +#ifdef NDEBUG +#undef NDEBUG +#endif +#include + +int +main(void) +{ + int major = -1; + int minor = -1; + int patch = -1; + char buf[64]; + + yaml_get_version(&major, &minor, &patch); + sprintf(buf, "%d.%d.%d", major, minor, patch); + assert(strcmp(buf, yaml_get_version_string()) == 0); + + /* Print structure sizes. */ + printf("sizeof(token) = %d\n", sizeof(yaml_token_t)); + printf("sizeof(event) = %d\n", sizeof(yaml_event_t)); + printf("sizeof(parser) = %d\n", sizeof(yaml_parser_t)); + + return 0; +} -- cgit v1.2.3