assert global value persistence

This commit is contained in:
fro
2017-07-11 19:12:01 +03:00
parent 7196129b32
commit d096e04052

View File

@ -97,6 +97,7 @@ fn global_get_set() {
let program = ProgramInstance::new().unwrap(); let program = ProgramInstance::new().unwrap();
let module = program.add_module("main", module, None).unwrap(); let module = program.add_module("main", module, None).unwrap();
assert_eq!(module.execute_index(0, vec![].into()).unwrap().unwrap(), RuntimeValue::I32(50)); assert_eq!(module.execute_index(0, vec![].into()).unwrap().unwrap(), RuntimeValue::I32(50));
assert_eq!(module.execute_index(0, vec![].into()).unwrap().unwrap(), RuntimeValue::I32(58));
} }
const SIGNATURE_I32_I32: &'static [ValueType] = &[ValueType::I32, ValueType::I32]; const SIGNATURE_I32_I32: &'static [ValueType] = &[ValueType::I32, ValueType::I32];