Debian Codegraph @

tests/integration/indexmap.rs

raw symbols SCIP
1 use crate::prelude::*;
2 use indexmap2::{indexmap, indexset, IndexMap, IndexSet};
3 use std::collections::{BTreeMap, BTreeSet};
4
5 #[test]
6 fn indexmap() {
7 test!(IndexMap<String, bool>)
8 .assert_identical::<BTreeMap<String, bool>>()
9 .assert_allows_ser_roundtrip([indexmap!(), indexmap!("key".to_owned() => true)])
10 .assert_matches_de_roundtrip(arbitrary_values());
11 }
12
13 #[test]
14 fn indexset() {
15 test!(IndexSet<String>)
16 .assert_identical::<BTreeSet<String>>()
17 .assert_allows_ser_roundtrip([indexset!(), indexset!("test".to_owned())])
18 .assert_matches_de_roundtrip(arbitrary_values());
19 }