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; mod run;
macro_rules! run_test { macro_rules! run_test {
($label: expr, $test_name: ident) => ( ($label: expr, $test_name: ident) => (
#[test] #[test]
fn $test_name() { fn $test_name() {
self::run::spec($label) self::run::spec($label)
} }
); );
} }
run_test!("address", wasm_address); run_test!("address", wasm_address);

View File

@ -2,22 +2,22 @@ use wabt::script::{ScriptParser, Command, CommandKind};
use parity_wasm::elements::{Module, deserialize_buffer}; use parity_wasm::elements::{Module, deserialize_buffer};
pub fn spec(path: &str) { pub fn spec(path: &str) {
let mut parser = ScriptParser::from_file(&format!("./testsuite/{}.wast", path)).expect("Can't read spec script"); 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") { while let Some(Command { kind, line }) = parser.next().expect("Failed to iterate") {
match kind { match kind {
CommandKind::AssertMalformed { module, .. } => CommandKind::AssertMalformed { module, .. } =>
{ {
let module_load = deserialize_buffer::<Module>( let module_load = deserialize_buffer::<Module>(
&module.into_vec().expect("Invalid filename provided") &module.into_vec().expect("Invalid filename provided")
); );
match module_load { match module_load {
Ok(_) => panic!("Expected invalid module definition, got some module!"), Ok(_) => panic!("Expected invalid module definition, got some module!"),
Err(e) => println!("assert_invalid at line {} - success ({:?})", line, e), Err(e) => println!("assert_invalid at line {} - success ({:?})", line, e),
} }
} }
_ => { _ => {
// Skipping interpreted // Skipping interpreted
} }
} }
} }
} }