mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 08:47:57 +00:00
Fix wasm_export_functions when using a return statement (#12107)
When used a return statement before we directly returned from the function which is obviously wrong.
This commit is contained in:
@@ -918,3 +918,14 @@ fn unreachable_intrinsic(wasm_method: WasmExecutionMethod) {
|
||||
error => panic!("unexpected error: {:?}", error),
|
||||
}
|
||||
}
|
||||
|
||||
test_wasm_execution!(return_value);
|
||||
fn return_value(wasm_method: WasmExecutionMethod) {
|
||||
let mut ext = TestExternalities::default();
|
||||
let mut ext = ext.ext();
|
||||
|
||||
assert_eq!(
|
||||
call_in_wasm("test_return_value", &[], wasm_method, &mut ext).unwrap(),
|
||||
(1234u64).encode()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user