Commit Graph

183 Commits

Author SHA1 Message Date
Mark McCaskey
7b2d0d4037 Signal error condition and update tests 2020-12-01 12:06:41 -08:00
Mark McCaskey
de6cb9c4c4 Merge branch 'master' into feature/host-env-prototype 2020-11-20 15:54:35 -08:00
Syrus
c4c57868ce Fix tests on deprecated API 2020-11-18 12:05:31 -08:00
Mark McCaskey
2690e5e8f6 Merge branch 'master' into feature/host-env-prototype 2020-11-16 15:13:29 -08:00
Ivan Enderlin
7c363ea451 test(c-api) Fix segfault. 2020-11-10 10:57:47 +01:00
Ivan Enderlin
5bbfc54757 chore(c-api) Run clang-format. 2020-11-10 10:53:20 +01:00
Ivan Enderlin
3b9e045259 test(c-api) Free wat and prevent failure in assert. 2020-11-10 10:49:20 +01:00
Ivan Enderlin
75fba28702 Update lib/c-api/tests/wasmer_wasm.h
Co-authored-by: nlewycky <nicholas@mxc.ca>
2020-11-09 20:05:57 +01:00
Ivan Enderlin
c88886f09c Merge branch 'master' into test-c-api-inline-c-rs 2020-11-09 17:19:14 +01:00
Ivan Enderlin
47b8d289b4 test(c-api) Assert wasm_name_t has the expected size. 2020-11-09 16:24:46 +01:00
Ivan Enderlin
69e1b7ccc0 test(c-api) Rollback: Use assert intead of wasmer_assert. 2020-11-09 15:55:31 +01:00
Ivan Enderlin
19fe6e482c test(c-api) _wasmer_assert_fail must exit the program. 2020-11-06 15:09:20 +01:00
Ivan Enderlin
55b2b88524 test(c-api) Declare a wasmer_assert_name helper. 2020-11-06 11:17:55 +01:00
Ivan Enderlin
8fdf928847 test(c-api) Rename our helper wasm_byte_vec_new_from_string to wasmer_…. 2020-11-06 10:16:25 +01:00
Ivan Enderlin
33a2651bab test(c-api) Implement wasmer_assert.
`assert.h` does nothing when the code is compiled in release
mode. That's not what we want :-). Let's reimplement `assert` as
`wasmer_assert`, which is close to the original `assert` function.
2020-11-06 09:39:12 +01:00
Ivan Enderlin
8009fea945 test(c-api) Include string.h inside tests/wasmer_wasm.h. 2020-11-06 09:03:29 +01:00
Ivan Enderlin
a4493ed990 doc(tests) Improve documentation of tests/wasmer_wasm.h. 2020-11-03 10:43:40 +01:00
Ivan Enderlin
1d208af530 test(c-api) Create a tests/wasmer_wasm.h file.
Remove the `build.rs` hack to add helper functions that are used only
in our tests. Now the tests can use the `tests/wasmer_wasm.h` file,
which simplifies the test workflow: No need to hack the build script
or anything if we want to add a helper function.
2020-11-03 10:41:00 +01:00
jubianchi
ae9ee50baf test(c-api) Enable the memory test example. 2020-10-30 14:07:41 +01:00
Ivan Enderlin
17683cdf7b Merge branch 'master' into feat-c-api-func-call-with-initialized-results 2020-10-30 13:43:41 +01:00
Ivan Enderlin
b1e875903a test(c-api) Enable the global test example. 2020-10-30 13:41:02 +01:00
Ivan Enderlin
bdb0dc772d Merge branch 'master' into feat-c-api-instance-new-traps 2020-10-30 09:38:06 +01:00
Mark McCaskey
5b67b2f3dc Merge branch 'master' into feature/host-env-prototype 2020-10-27 16:24:00 -07:00
Nick Lewycky
126819eda6 Don't assume the serialized data came from engine-jit. 2020-10-26 12:32:08 -07:00
Ivan Enderlin
38c57e138f test(c-api) Enable the wasm-c-api-start test. 2020-10-26 15:27:20 +01:00
Mark McCaskey
46204d6357 Fix up more tests 2020-10-21 12:00:30 -07:00
Ivan Enderlin
d7d40e542f Merge branch 'master' into feat-c-api-update-wasm-h 2020-10-16 10:18:46 +02:00
Mark McCaskey
e3ec9f34c1 Prevent panic when min > static bound and max is less than it 2020-10-13 14:39:25 -07:00
Ivan Enderlin
0b4ef7add7 test(c-api) Don't pass NULL for zero args/results to wasm_func_call!
We must pass an empty array.
2020-10-12 13:34:20 +02:00
Ivan Enderlin
4186d1ce58 test(c-api) Use wasm_extern_vec_t for wasm_get_imports. 2020-10-12 13:33:46 +02:00
Ivan Enderlin
5bf90558c7 test(c-api) Fix the early-exit test. 2020-10-12 13:17:40 +02:00
Ivan Enderlin
18729709bf feat(c-api) Update wasm-c-api repository.
This change is important because `wasm.h` contains new functions, like
`wasm_name_new_from_string_nt`, which are useful for the Go
implementation.
2020-10-09 14:37:07 +02:00
Mark McCaskey
f7d5a11b39 Fix sentinel value in wasm_limits_t for memory in wasm_c_api 2020-10-07 16:38:23 -07:00
Ivan Enderlin
c3efc06e87 test(c-api) Add test case for wat2wasm. 2020-10-06 20:56:36 +02:00
Mark McCaskey
ab153fc642 Improve error messages around memory creation 2020-10-05 15:45:52 -07:00
Mark McCaskey
3845e5fd67 Clean up binary files from C API refactor 2020-10-02 15:30:13 -07:00
Ivan Enderlin
92ca7899f5 chore(c-api) Use canonical path to wasm*.h headers. 2020-10-02 11:15:37 +02:00
Ivan Enderlin
1a45756cad test(c-api) Use the REQUIRED option of find_library. 2020-10-02 09:45:34 +02:00
Ivan Enderlin
d5fa525612 test(c-api) Enable the test-early-exit test case. 2020-10-01 23:23:41 +02:00
Ivan Enderlin
ddbbd96f1c test(c-api) Run make clean before, in case of. 2020-10-01 23:23:23 +02:00
Ivan Enderlin
68d6292c35 test(c-api) Restore the test-wasi and disable the test-early-exit. 2020-10-01 21:40:02 +02:00
Ivan Enderlin
5d9fc86bb8 test(c-api) Enable the wasi-c-api-trap test case. 2020-10-01 21:27:18 +02:00
Ivan Enderlin
bf7b50a8eb test(c-api) Restore the wasm-c-api test suite. 2020-10-01 14:13:02 +02:00
Ivan Enderlin
3f8d7f4f74 test(c-api) Update the CMake project name for the deprecated test suite. 2020-10-01 10:11:02 +02:00
Ivan Enderlin
c1fb4b2c29 test(c-api) Restore the deprecated test suite. 2020-10-01 10:07:35 +02:00
Ivan Enderlin
ecfa22867e test(c-api) Improve test outputs. 2020-09-28 17:17:25 +02:00
Ivan Enderlin
ffd1e6eddf test(c-api) Split the test suites (deprecated and wasm-c-api). 2020-09-28 17:09:44 +02:00
Ivan Enderlin
da69eca99b test(c-api) Update CMake to match all Wasm C API examples. 2020-09-18 10:11:09 +02:00
Nick Lewycky
fadd5d6699 Remove nearly-all mentions of reborn. 2020-08-13 11:32:14 -07:00
Mark McCaskey
8a9ac6ce59 Add helper function to get the start function 2020-08-12 18:03:57 -07:00