mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-07-03 08:32:06 +00:00
convert spaces to tabs
This commit is contained in:
@ -6,12 +6,12 @@ extern crate parity_wasm;
|
||||
mod run;
|
||||
|
||||
macro_rules! run_test {
|
||||
($label: expr, $test_name: ident) => (
|
||||
#[test]
|
||||
fn $test_name() {
|
||||
self::run::spec($label)
|
||||
}
|
||||
);
|
||||
($label: expr, $test_name: ident) => (
|
||||
#[test]
|
||||
fn $test_name() {
|
||||
self::run::spec($label)
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
run_test!("address", wasm_address);
|
||||
|
@ -2,22 +2,22 @@ use wabt::script::{ScriptParser, Command, CommandKind};
|
||||
use parity_wasm::elements::{Module, deserialize_buffer};
|
||||
|
||||
pub fn spec(path: &str) {
|
||||
let mut parser = ScriptParser::from_file(&format!("./testsuite/{}.wast", path)).expect("Can't read spec script");
|
||||
while let Some(Command { kind, line }) = parser.next().expect("Failed to iterate") {
|
||||
match kind {
|
||||
CommandKind::AssertMalformed { module, .. } =>
|
||||
{
|
||||
let module_load = deserialize_buffer::<Module>(
|
||||
&module.into_vec().expect("Invalid filename provided")
|
||||
);
|
||||
match module_load {
|
||||
Ok(_) => panic!("Expected invalid module definition, got some module!"),
|
||||
Err(e) => println!("assert_invalid at line {} - success ({:?})", line, e),
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
// Skipping interpreted
|
||||
}
|
||||
}
|
||||
}
|
||||
let mut parser = ScriptParser::from_file(&format!("./testsuite/{}.wast", path)).expect("Can't read spec script");
|
||||
while let Some(Command { kind, line }) = parser.next().expect("Failed to iterate") {
|
||||
match kind {
|
||||
CommandKind::AssertMalformed { module, .. } =>
|
||||
{
|
||||
let module_load = deserialize_buffer::<Module>(
|
||||
&module.into_vec().expect("Invalid filename provided")
|
||||
);
|
||||
match module_load {
|
||||
Ok(_) => panic!("Expected invalid module definition, got some module!"),
|
||||
Err(e) => println!("assert_invalid at line {} - success ({:?})", line, e),
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
// Skipping interpreted
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user