Skip to content

Commit

Permalink
fix: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
loloicci committed Feb 9, 2024
1 parent 228b292 commit f4e503e
Show file tree
Hide file tree
Showing 27 changed files with 694 additions and 3,524 deletions.
601 changes: 43 additions & 558 deletions contracts/call-number/Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/call-number/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ thiserror = "1.0.24"

[dev-dependencies]
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator"] }
wasmer = { version = "2.3", default-features = false, features = ["cranelift", "universal", "singlepass"] }
wasmer = { version = "=4.2.2", default-features = false, features = ["cranelift", "singlepass"] }
8 changes: 5 additions & 3 deletions contracts/call-number/tests/integration.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use cosmwasm_vm::testing::{Contract, MockInstanceOptions};
use cosmwasm_std::to_json_vec;
use cosmwasm_vm::testing::{mock_env, Contract, MockInstanceOptions};
use std::collections::HashMap;
use wasmer::{FunctionType, Type};

Expand Down Expand Up @@ -34,10 +35,11 @@ fn required_imports() -> Vec<(String, String, FunctionType)> {
#[test]
fn dynamic_link_import_works() {
let options = MockInstanceOptions::default();
let contract = Contract::from_code(CONTRACT_CALLER, &options, None).unwrap();
let env = to_json_vec(&mock_env()).unwrap();
let contract = Contract::from_code(CONTRACT_CALLER, &env, &options, None).unwrap();

let import_function_map: HashMap<_, _> = contract
.module
.module()
.imports()
.functions()
.map(|import| {
Expand Down
Loading

0 comments on commit f4e503e

Please sign in to comment.