| 39 | |
| 40 | #[test] |
| 41 | fn test_partial_map_matching() { |
| 42 | let mut string_map = HashMap::new(); |
| 43 | string_map.insert("key1".to_string(), "value1".to_string()); |
| 44 | string_map.insert("key2".to_string(), "value2".to_string()); |
| 45 | string_map.insert("key3".to_string(), "value3".to_string()); |
| 46 | |
| 47 | let data = TestData { |
| 48 | string_map, |
| 49 | int_map: HashMap::new(), |
| 50 | btree_map: BTreeMap::new(), |
| 51 | nested_map: HashMap::new(), |
| 52 | }; |
| 53 | |
| 54 | // Test partial matching - only check some keys |
| 55 | assert_struct!(data, TestData { |
| 56 | string_map: #{ "key1": "value1", "key3": "value3", .. }, |
| 57 | .. |
| 58 | }); |
| 59 | } |
| 60 | |
| 61 | #[test] |
| 62 | fn test_map_with_comparison_operators() { |