Add sanity tests

This commit is contained in:
Jakub Konka
2019-05-14 13:27:46 +02:00
committed by Dan Gohman
parent 7f3c325cdf
commit 9ad16cc702
7 changed files with 79 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
extern crate wasi_common_cbindgen;
pub use wasi_common_cbindgen::wasi_common_cbindgen;
#[wasi_common_cbindgen]
fn val_args(a: usize, b: usize) -> usize {
a + b
}
fn main() {
assert_eq!(unsafe { __wasi_val_args(1, 2) }, val_args(1, 2));
}