aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorcomex2015-01-17 14:20:14 -0500
committercomex2015-01-17 14:20:14 -0500
commitb70953f09edf0865c385c55af09f211a64306d2b (patch)
treec5e7f5e513c95c9795abd80cf64c49b8c710d402 /test
parentfixes and test - both tests work on all archs (diff)
downloadsubstitute-b70953f09edf0865c385c55af09f211a64306d2b.tar.gz
add an assert
Diffstat (limited to 'test')
-rw-r--r--test/test-imp-forwarding.m2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test-imp-forwarding.m b/test/test-imp-forwarding.m
index 0beb24a..98898e1 100644
--- a/test/test-imp-forwarding.m
+++ b/test/test-imp-forwarding.m
@@ -31,6 +31,8 @@ int main() {
SEL sel = @selector(some);
IMP imp;
assert(!get_trampoline(what_to_call, imp1, (void *) 0x123, &imp));
+ uint8_t *ip = (void *) imp;
+ assert(ip[TRAMPOLINE_SIZE] == ip[0]);
printf("imp = %p\n", imp);
((void (*)(id, SEL, int, int)) imp)(@"foo", sel, 1, 2);
free_trampoline(imp);