convert spaces to tabs

This commit is contained in:
NikVolf
2018-02-20 18:05:19 +03:00
parent 75745055cc
commit 2ea7022ca8
2 changed files with 24 additions and 24 deletions

View File

@ -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);

View File

@ -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
}
}
}
}