aboutsummaryrefslogtreecommitdiff
path: root/tests/ECMSetupVersionTest/old_header/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ECMSetupVersionTest/old_header/main.c')
-rw-r--r--tests/ECMSetupVersionTest/old_header/main.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/ECMSetupVersionTest/old_header/main.c b/tests/ECMSetupVersionTest/old_header/main.c
new file mode 100644
index 00000000..1ae1679b
--- /dev/null
+++ b/tests/ECMSetupVersionTest/old_header/main.c
@@ -0,0 +1,24 @@
+#include <ecm_old_header_version.h>
+#include <string.h>
+#include <stdio.h>
+
+#define intcheck(macro,val) \
+ if (macro != val) { \
+ printf(#macro " was %d instead of %d", macro, val); \
+ return 1; \
+ }
+#define strcheck(macro,val) \
+ if (strcmp(macro,val) != 0) { \
+ printf(#macro " was %s instead of %s", macro, val); \
+ return 1; \
+ }
+
+int main()
+{
+ intcheck(Foo_VERSION_MAJOR,2)
+ intcheck(Foo_VERSION_MINOR,3)
+ intcheck(Foo_VERSION_PATCH,4)
+ intcheck(Foo_VERSION,((2 << 16) + (3 << 8) + 4))
+ strcheck(Foo_VERSION_STRING,"2.3.4")
+ return 0;
+}