mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-12 22:05:33 +00:00
Improved test banner
This commit is contained in:
parent
76d9b2602e
commit
f95863964d
@ -5,6 +5,9 @@ use std::time::SystemTime;
|
||||
use wabt::script::{Action, Command, CommandKind, ModuleBinary, ScriptParser, Value};
|
||||
use wabt::wasm2wat;
|
||||
|
||||
static BANNER: &str = "// Rust test file autogenerated with cargo build (src/build_spectests.rs).
|
||||
// Please do NOT modify it by hand, as it will be reseted on next build.\n";
|
||||
|
||||
struct WastTestGenerator {
|
||||
last_module: i32,
|
||||
last_line: u64,
|
||||
@ -48,9 +51,9 @@ impl WastTestGenerator {
|
||||
}
|
||||
|
||||
fn consume(&mut self) {
|
||||
self.buffer.push_str(BANNER);
|
||||
self.buffer.push_str(&format!(
|
||||
"// Rust test file autogenerated from {}
|
||||
// Please do not modify
|
||||
"// Test based on spectests/{}
|
||||
|
||||
use crate::webassembly::{{instantiate, compile, ImportObject, ResultObject, VmCtx, Export}};
|
||||
use wabt::wat2wasm;\n\n",
|
||||
@ -282,7 +285,7 @@ fn main() {
|
||||
.map(|module| format!("mod {};", module))
|
||||
.collect();
|
||||
|
||||
modfile_uses.insert(0, "// This file is autogenerated\n".to_string());
|
||||
modfile_uses.insert(0, BANNER.to_string());
|
||||
// We add an empty line
|
||||
modfile_uses.push("".to_string());
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
// Rust test file autogenerated from br_if.wast
|
||||
// Please do not modify
|
||||
// Rust test file autogenerated with cargo build (src/build_spectests.rs).
|
||||
// Please do NOT modify it by hand, as it will be reseted on next build.
|
||||
// Test based on spectests/br_if.wast
|
||||
|
||||
use crate::webassembly::{instantiate, compile, ImportObject, ResultObject, VmCtx, Export};
|
||||
use wabt::wat2wasm;
|
||||
|
@ -1,5 +1,6 @@
|
||||
// Rust test file autogenerated from call.wast
|
||||
// Please do not modify
|
||||
// Rust test file autogenerated with cargo build (src/build_spectests.rs).
|
||||
// Please do NOT modify it by hand, as it will be reseted on next build.
|
||||
// Test based on spectests/call.wast
|
||||
|
||||
use crate::webassembly::{instantiate, compile, ImportObject, ResultObject, VmCtx, Export};
|
||||
use wabt::wat2wasm;
|
||||
|
@ -1,5 +1,6 @@
|
||||
// Rust test file autogenerated from i32.wast
|
||||
// Please do not modify
|
||||
// Rust test file autogenerated with cargo build (src/build_spectests.rs).
|
||||
// Please do NOT modify it by hand, as it will be reseted on next build.
|
||||
// Test based on spectests/i32_.wast
|
||||
|
||||
use crate::webassembly::{instantiate, compile, ImportObject, ResultObject, VmCtx, Export};
|
||||
use wabt::wat2wasm;
|
||||
|
@ -1,5 +1,6 @@
|
||||
// Rust test file autogenerated from memory.wast
|
||||
// Please do not modify
|
||||
// Rust test file autogenerated with cargo build (src/build_spectests.rs).
|
||||
// Please do NOT modify it by hand, as it will be reseted on next build.
|
||||
// Test based on spectests/memory.wast
|
||||
|
||||
use crate::webassembly::{instantiate, compile, ImportObject, ResultObject, VmCtx, Export};
|
||||
use wabt::wat2wasm;
|
||||
|
@ -1,4 +1,5 @@
|
||||
// This file is autogenerated
|
||||
// Rust test file autogenerated with cargo build (src/build_spectests.rs).
|
||||
// Please do NOT modify it by hand, as it will be reseted on next build.
|
||||
|
||||
mod br_if;
|
||||
mod call;
|
||||
|
@ -1,5 +1,6 @@
|
||||
// Rust test file autogenerated from types.wast
|
||||
// Please do not modify
|
||||
// Rust test file autogenerated with cargo build (src/build_spectests.rs).
|
||||
// Please do NOT modify it by hand, as it will be reseted on next build.
|
||||
// Test based on spectests/types.wast
|
||||
|
||||
use crate::webassembly::{instantiate, compile, ImportObject, ResultObject, VmCtx, Export};
|
||||
use wabt::wat2wasm;
|
||||
|
Loading…
Reference in New Issue
Block a user