Skip to content

Commit 5c81608

Browse files
committed
Bring back test
1 parent 4a76d94 commit 5c81608

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

packages/std/src/testing/mock.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,4 +2342,27 @@ mod tests {
23422342
fn making_an_address_with_empty_prefix_should_panic() {
23432343
MockApi::default().with_prefix("").addr_make("creator");
23442344
}
2345+
2346+
#[test]
2347+
#[cfg(feature = "cosmwasm_1_3")]
2348+
fn distribution_querier_new_works() {
2349+
let addresses = [
2350+
("addr0000".to_string(), "addr0001".to_string()),
2351+
("addr0002".to_string(), "addr0001".to_string()),
2352+
];
2353+
let btree_map = BTreeMap::from(addresses.clone());
2354+
2355+
// should still work with HashMap
2356+
let hashmap = HashMap::from(addresses.clone());
2357+
let querier = DistributionQuerier::new(hashmap);
2358+
assert_eq!(querier.withdraw_addresses, btree_map);
2359+
2360+
// should work with BTreeMap
2361+
let querier = DistributionQuerier::new(btree_map.clone());
2362+
assert_eq!(querier.withdraw_addresses, btree_map);
2363+
2364+
// should work with array
2365+
let querier = DistributionQuerier::new(addresses);
2366+
assert_eq!(querier.withdraw_addresses, btree_map);
2367+
}
23452368
}

0 commit comments

Comments
 (0)