mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-06-26 13:12:04 +00:00
Fix basics tests
This commit is contained in:
@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user