File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use wasmtime_wasi::preview1::WasiP1Ctx;
88use wasmtime_wasi:: { I32Exit , WasiCtxBuilder } ;
99
1010use crate :: codec:: Codec ;
11- use crate :: function_run_result:: FunctionRunResult ;
11+ use crate :: function_run_result:: { FunctionRunResult , FunctionOutput } ;
1212#[ derive( Clone ) ]
1313pub struct ProfileOpts {
1414 pub interval : u32 ,
@@ -403,7 +403,8 @@ mod tests {
403403
404404 #[ test]
405405 fn test_wasm_api_function ( ) {
406- let input = json ! ( { "test" : "echo" } ) . to_string ( ) . into_bytes ( ) ;
406+ let expected_input_value = json ! ( { "foo" : "echo" , "bar" : "test" } ) ;
407+ let input = expected_input_value. to_string ( ) . into_bytes ( ) ;
407408 let function_run_result = run ( FunctionRunParams {
408409 function_path : Path :: new ( "tests/fixtures/build/echo.trampolined.wasm" ) . to_path_buf ( ) ,
409410 input,
@@ -412,5 +413,6 @@ mod tests {
412413 } ) ;
413414
414415 assert ! ( function_run_result. is_ok( ) ) ;
416+ assert_eq ! ( function_run_result. unwrap( ) . input, expected_input_value) ;
415417 }
416418}
You can’t perform that action at this time.
0 commit comments