mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-04-25 07:12:15 +00:00
invoke action
This commit is contained in:
parent
dfd6152cda
commit
c91cb3fff9
@ -10,3 +10,4 @@ macro_rules! run_test {
|
||||
run_test!("i32", wasm_i32);
|
||||
run_test!("endianness", wasm_endianness);
|
||||
run_test!("i64", wasm_i64);
|
||||
run_test!("address", wasm_address);
|
||||
|
@ -140,14 +140,22 @@ pub fn spec(name: &str) {
|
||||
&test::Command::AssertInvalid { line, ref filename, .. } => {
|
||||
let module_load = try_load(&outdir, filename);
|
||||
match module_load {
|
||||
Ok(result) => {
|
||||
Ok(_) => {
|
||||
panic!("Expected invalid module definition, got some module!")
|
||||
},
|
||||
Err(e) => {
|
||||
println!("assert_invalid at line {} - success ({:?})", line, e)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
&test::Command::Action { line, ref action } => {
|
||||
match run_action(&*module, action) {
|
||||
Ok(_) => { },
|
||||
Err(e) => {
|
||||
panic!("Failed to invoke action at line {}: {:?}", line, e)
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,11 @@ pub enum Command {
|
||||
line: u64,
|
||||
filename: String,
|
||||
text: String,
|
||||
},
|
||||
#[serde(rename = "action")]
|
||||
Action {
|
||||
line: u64,
|
||||
action: Action,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user