diff options
author | Ben Smith <binjimin@gmail.com> | 2018-02-13 22:08:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-13 22:08:47 -0800 |
commit | 6589cbb48abe0d1ecaf14b59b22bfbb70f62a77a (patch) | |
tree | 1248864fd1aaab87ff484d0e7015551f733a2572 /test/spec-wasm2c-prefix.c | |
parent | 0e4a9d04c535d2b9dc9a00fbe95c2f941d5677e1 (diff) | |
download | wabt-6589cbb48abe0d1ecaf14b59b22bfbb70f62a77a.tar.gz wabt-6589cbb48abe0d1ecaf14b59b22bfbb70f62a77a.tar.bz2 wabt-6589cbb48abe0d1ecaf14b59b22bfbb70f62a77a.zip |
Update testsuite (#757)
The spectest module's functions and globals are no longer overloaded, so
their implementations in `spectest-interp` and `spec-wasm2c-prefix.c`
have to be changed as well.
Diffstat (limited to 'test/spec-wasm2c-prefix.c')
-rw-r--r-- | test/spec-wasm2c-prefix.c | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/test/spec-wasm2c-prefix.c b/test/spec-wasm2c-prefix.c index b55664ce..c1cab955 100644 --- a/test/spec-wasm2c-prefix.c +++ b/test/spec-wasm2c-prefix.c @@ -270,43 +270,45 @@ void wasm_rt_allocate_table(wasm_rt_table_t* table, /* * spectest implementations */ -static void spectest_print_vv(void) { +static void spectest_print(void) { printf("spectest.print()\n"); } -static void spectest_print_vi(uint32_t i) { - printf("spectest.print(%d)\n", i); +static void spectest_print_i32(uint32_t i) { + printf("spectest.print_i32(%d)\n", i); } -static void spectest_print_vf(float f) { - printf("spectest.print(%g)\n", f); +static void spectest_print_f32(float f) { + printf("spectest.print_f32(%g)\n", f); } -static void spectest_print_vif(uint32_t i, float f) { - printf("spectest.print(%d %g)\n", i, f); +static void spectest_print_i32_f32(uint32_t i, float f) { + printf("spectest.print_i32_f32(%d %g)\n", i, f); } -static void spectest_print_vd(double d) { - printf("spectest.print(%g)\n", d); +static void spectest_print_f64(double d) { + printf("spectest.print_f64(%g)\n", d); } -static void spectest_print_vdd(double d1, double d2) { - printf("spectest.print(%g %g)\n", d1, d2); +static void spectest_print_f64_f64(double d1, double d2) { + printf("spectest.print_f64_f64(%g %g)\n", d1, d2); } static wasm_rt_table_t spectest_table; static wasm_rt_memory_t spectest_memory; -static uint32_t spectest_global = 666; - -void (*Z_spectestZ_printZ_vv)(void) = &spectest_print_vv; -void (*Z_spectestZ_printZ_vi)(uint32_t) = &spectest_print_vi; -void (*Z_spectestZ_printZ_vf)(float) = &spectest_print_vf; -void (*Z_spectestZ_printZ_vif)(uint32_t, float) = &spectest_print_vif; -void (*Z_spectestZ_printZ_vd)(double) = &spectest_print_vd; -void (*Z_spectestZ_printZ_vdd)(double, double) = &spectest_print_vdd; +static uint32_t spectest_global_i32 = 666; + +void (*Z_spectestZ_printZ_vv)(void) = &spectest_print; +void (*Z_spectestZ_print_i32Z_vi)(uint32_t) = &spectest_print_i32; +void (*Z_spectestZ_print_f32Z_vf)(float) = &spectest_print_f32; +void (*Z_spectestZ_print_i32_f32Z_vif)(uint32_t, + float) = &spectest_print_i32_f32; +void (*Z_spectestZ_print_f64Z_vd)(double) = &spectest_print_f64; +void (*Z_spectestZ_print_f64_f64Z_vdd)(double, + double) = &spectest_print_f64_f64; wasm_rt_table_t* Z_spectestZ_table = &spectest_table; wasm_rt_memory_t* Z_spectestZ_memory = &spectest_memory; -uint32_t* Z_spectestZ_globalZ_i = &spectest_global; +uint32_t* Z_spectestZ_global_i32Z_i = &spectest_global_i32; static void init_spectest_module(void) { wasm_rt_allocate_memory(&spectest_memory, 1, 2); |