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

Function test_exact_map_matching

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

Source from the content-addressed store, hash-verified

20
21#[test]
22fn test_exact_map_matching() {
23 let mut string_map = HashMap::new();
24 string_map.insert("key1".to_string(), "value1".to_string());
25
26 let data = TestData {
27 string_map,
28 int_map: HashMap::new(),
29 btree_map: BTreeMap::new(),
30 nested_map: HashMap::new(),
31 };
32
33 // Test exact matching with single entry
34 assert_struct!(data, TestData {
35 string_map: #{ "key1": "value1" },
36 ..
37 });
38}
39
40#[test]
41fn test_partial_map_matching() {

Callers

nothing calls this directly

Calls 1

insertMethod · 0.80

Tested by

no test coverage detected