aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/reloc12.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/reloc12.c')
-rw-r--r--testsuite/reloc12.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/reloc12.c b/testsuite/reloc12.c
new file mode 100644
index 0000000..cfa8888
--- /dev/null
+++ b/testsuite/reloc12.c
@@ -0,0 +1,19 @@
+#include "reloc12.h"
+#include <stdlib.h>
+
+int main()
+{
+ A* ptr = find('b');
+ if(b(ptr) != 0)
+ abort();
+
+ ptr = find('a');
+ if(b(ptr) != 1)
+ abort();
+
+ ptr = find('r');
+ if(b(ptr) != 2)
+ abort();
+
+ exit(0);
+}