mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 08:11:02 +00:00
contracts: Remove wat support from test fixtures (#3588)
In order to prepare for PolkaVM support I removed the wat support from our test fixture crate. - Removed redundant tests (invalid module checks are already inside the prepare module where they belong - Converted the gas_sync tests to Rust - Moved the start function test to the `wasm` module
This commit is contained in:
committed by
GitHub
parent
117a9433da
commit
4ae7398818
@@ -3442,4 +3442,22 @@ mod tests {
|
||||
runtime.read_sandbox_memory_as(&memory, 0u32).unwrap();
|
||||
assert_eq!(decoded.into_inner(), data);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn run_out_of_gas_in_start_fn() {
|
||||
const CODE: &str = r#"
|
||||
(module
|
||||
(import "env" "memory" (memory 1 1))
|
||||
(start $start)
|
||||
(func $start
|
||||
(loop $inf (br $inf)) ;; just run out of gas
|
||||
(unreachable)
|
||||
)
|
||||
(func (export "call"))
|
||||
(func (export "deploy"))
|
||||
)
|
||||
"#;
|
||||
let mut mock_ext = MockExt::default();
|
||||
assert_err!(execute(&CODE, vec![], &mut mock_ext), <Error<Test>>::OutOfGas);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user