Fix basics tests

This commit is contained in:
Sergey Pepyakin
2017-12-12 15:18:35 +01:00
parent 74559a49b0
commit 1fc65ca54f
8 changed files with 357 additions and 370 deletions

View File

@ -1,6 +1,6 @@
mod basics;
mod wabt;
mod wasm;
// mod wabt;
// mod wasm;
mod utils {
use elements::{Internal, ExportEntry, InitExpr, Opcode, ValueType, GlobalType, GlobalEntry};
@ -8,7 +8,7 @@ mod utils {
use builder::module;
pub fn program_with_default_env() -> ProgramInstance {
let program = ProgramInstance::new();
let mut program = ProgramInstance::new();
let env_module = module()
.memory()
.with_min(256) // 256 pages. 256 * 64K = 16MB
@ -23,7 +23,7 @@ mod utils {
.with_global(GlobalEntry::new(GlobalType::new(ValueType::I32, false), InitExpr::new(vec![Opcode::I32Const(0), Opcode::End])))
.with_export(ExportEntry::new("memoryBase".into(), Internal::Global(1)))
.build();
program.add_module("env", env_module, None).unwrap();
program.add_module("env", env_module, &mut ()).unwrap();
program
}
}