Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 18cddea

Browse files
committed
fix wasm tests
1 parent d0557d4 commit 18cddea

File tree

1 file changed

+7
-7
lines changed
  • frame/contracts/src/wasm

1 file changed

+7
-7
lines changed

frame/contracts/src/wasm/mod.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -2333,7 +2333,7 @@ mod tests {
23332333
let call =
23342334
RuntimeCall::System(frame_system::Call::remark { remark: b"Hello World".to_vec() });
23352335
let mut ext = MockExt::default();
2336-
let result = execute(CODE_CALL_RUNTIME, call.encode(), &mut ext).unwrap();
2336+
let result = execute_with_unstable(CODE_CALL_RUNTIME, call.encode(), &mut ext).unwrap();
23372337
assert_eq!(*ext.runtime_calls.borrow(), vec![call]);
23382338
// 0 = ReturnCode::Success
23392339
assert_eq!(u32::from_le_bytes(result.data.try_into().unwrap()), 0);
@@ -2342,7 +2342,7 @@ mod tests {
23422342
#[test]
23432343
fn call_runtime_panics_on_invalid_call() {
23442344
let mut ext = MockExt::default();
2345-
let result = execute(CODE_CALL_RUNTIME, vec![0x42], &mut ext);
2345+
let result = execute_with_unstable(CODE_CALL_RUNTIME, vec![0x42], &mut ext);
23462346
assert_eq!(
23472347
result,
23482348
Err(ExecError {
@@ -2670,15 +2670,15 @@ mod tests {
26702670

26712671
// value does not exist -> error returned
26722672
let input = (63, [1u8; 64]).encode();
2673-
let result = execute(CODE, input, &mut ext).unwrap();
2673+
let result = execute_with_unstable(CODE, input, &mut ext).unwrap();
26742674
assert_eq!(
26752675
u32::from_le_bytes(result.data[0..4].try_into().unwrap()),
26762676
ReturnCode::KeyNotFound as u32
26772677
);
26782678

26792679
// value did exist -> value returned
26802680
let input = (64, [1u8; 64]).encode();
2681-
let result = execute(CODE, input, &mut ext).unwrap();
2681+
let result = execute_with_unstable(CODE, input, &mut ext).unwrap();
26822682
assert_eq!(
26832683
u32::from_le_bytes(result.data[0..4].try_into().unwrap()),
26842684
ReturnCode::Success as u32
@@ -2688,7 +2688,7 @@ mod tests {
26882688

26892689
// value did exist -> length returned (test for 0 sized)
26902690
let input = (19, [2u8; 19]).encode();
2691-
let result = execute(CODE, input, &mut ext).unwrap();
2691+
let result = execute_with_unstable(CODE, input, &mut ext).unwrap();
26922692
assert_eq!(
26932693
u32::from_le_bytes(result.data[0..4].try_into().unwrap()),
26942694
ReturnCode::Success as u32
@@ -2936,7 +2936,7 @@ mod tests {
29362936
"#;
29372937

29382938
let mut mock_ext = MockExt::default();
2939-
execute(CODE, vec![], &mut mock_ext).unwrap();
2939+
execute_with_unstable(CODE, vec![], &mut mock_ext).unwrap();
29402940
}
29412941

29422942
#[test]
@@ -2968,7 +2968,7 @@ mod tests {
29682968
"#;
29692969

29702970
let mut mock_ext = MockExt::default();
2971-
execute(CODE, vec![], &mut mock_ext).unwrap();
2971+
execute_with_unstable(CODE, vec![], &mut mock_ext).unwrap();
29722972
}
29732973

29742974
/// This test check that an unstable interface cannot be deployed. In case of runtime

0 commit comments

Comments
 (0)