MCPcopy Create free account
hub / github.com/carllerche/assert-struct / test_btree_map

Function test_btree_map

assert-struct/tests/maps.rs:112–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110
111#[test]
112fn test_btree_map() {
113 let mut btree_map = BTreeMap::new();
114 btree_map.insert("first".to_string(), "alpha".to_string());
115 btree_map.insert("second".to_string(), "beta".to_string());
116
117 let data = TestData {
118 string_map: HashMap::new(),
119 int_map: HashMap::new(),
120 btree_map,
121 nested_map: HashMap::new(),
122 };
123
124 // Test BTreeMap duck typing
125 assert_struct!(data, TestData {
126 btree_map: #{ "first": "alpha", "second": "beta" },
127 ..
128 });
129}
130
131#[test]
132fn test_nested_patterns() {

Callers

nothing calls this directly

Calls 1

insertMethod · 0.80

Tested by

no test coverage detected