| 1 |
/// @file |
| 2 |
/// @brief Tester for https://gitlab.com/graphviz/graphviz/-/issues/2716 |
| 3 |
|
| 4 |
#include <graphviz/graphviz_version.h> |
| 5 |
#include <stdio.h> |
| 6 |
|
| 7 |
// confirm the version macros are usable at compile-time |
| 8 |
#ifndef GRAPHVIZ_VERSION_MAJOR |
| 9 |
#error "GRAPHVIZ_VERSION_MAJOR missing" |
| 10 |
#endif |
| 11 |
#ifndef GRAPHVIZ_VERSION_MINOR |
| 12 |
#error "GRAPHVIZ_VERSION_MINOR missing" |
| 13 |
#endif |
| 14 |
#ifndef GRAPHVIZ_VERSION_PATCH |
| 15 |
#error "GRAPHVIZ_VERSION_PATCH missing" |
| 16 |
#endif |
| 17 |
|
| 18 |
// confirm they are numeric values |
| 19 |
static const int x = GRAPHVIZ_VERSION_MAJOR; |
| 20 |
static const int y = GRAPHVIZ_VERSION_MINOR; |
| 21 |
static const int z = GRAPHVIZ_VERSION_PATCH; |
| 22 |
|
| 23 |
int main(void) { |
| 24 |
printf("%d.%d.%d\n", x, y, z); |
| 25 |
return 0; |
| 26 |
} |