| 1 |
#include <ecm_new_explicit_header_version.h> |
| 2 |
#include <string.h> |
| 3 |
#include <stdio.h> |
| 4 |
|
| 5 |
#define intcheck(macro,val) \ |
| 6 |
if (macro != val) { \ |
| 7 |
printf(#macro " was %d instead of %d", macro, val); \ |
| 8 |
return 1; \ |
| 9 |
} |
| 10 |
#define strcheck(macro,val) \ |
| 11 |
if (strcmp(macro,val) != 0) { \ |
| 12 |
printf(#macro " was %s instead of %s", macro, val); \ |
| 13 |
return 1; \ |
| 14 |
} |
| 15 |
|
| 16 |
int main() |
| 17 |
{ |
| 18 |
intcheck(Foo_VERSION_MAJOR,2) |
| 19 |
intcheck(Foo_VERSION_MINOR,3) |
| 20 |
intcheck(Foo_VERSION_PATCH,4) |
| 21 |
intcheck(Foo_VERSION,((2 << 16) + (3 << 8) + 4)) |
| 22 |
strcheck(Foo_VERSION_STRING,"2.3.4") |
| 23 |
return 0; |
| 24 |
} |