mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-07-03 16:41:59 +00:00
convert spaces to tabs
This commit is contained in:
@ -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);
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user