aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-28 18:12:53 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-03 14:41:29 -0700
commitc76946b2f3cebf00a5e24c9582eb9b59f1039a6d (patch)
tree26754c6f7429e6a502e222f5d44be31980a87503 /tests
parentaa1c42a298a568f2910cb0a184824763016ce64f (diff)
support function pointer calls across asm modules by passing them all through invoke (for now), and have a global function table in the Runtime, which modules register their functions to
Diffstat (limited to 'tests')
-rw-r--r--tests/test_core.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index c6b1a69e..4871eef1 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -5714,6 +5714,13 @@ def process(filename):
CMP_TYPE lib_cmp_ptr;
int arr[5] = {4, 2, 5, 1, 3};
+ qsort((void*)arr, 5, sizeof(int), main_cmp);
+ printf("Sort with main comparison: ");
+ for (int i = 0; i < 5; i++) {
+ printf("%d ", arr[i]);
+ }
+ printf("\\n");
+
lib_handle = dlopen("liblib.so", RTLD_NOW);
if (lib_handle == NULL) {
printf("Could not load lib.\\n");
@@ -5725,14 +5732,6 @@ def process(filename):
return 1;
}
lib_cmp_ptr = getter_ptr();
-
- qsort((void*)arr, 5, sizeof(int), main_cmp);
- printf("Sort with main comparison: ");
- for (int i = 0; i < 5; i++) {
- printf("%d ", arr[i]);
- }
- printf("\\n");
-
qsort((void*)arr, 5, sizeof(int), lib_cmp_ptr);
printf("Sort with lib comparison: ");
for (int i = 0; i < 5; i++) {