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

Function test_map_with_equality_operators

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

Source from the content-addressed store, hash-verified

86
87#[test]
88fn test_map_with_equality_operators() {
89 let mut int_map = HashMap::new();
90 int_map.insert("status".to_string(), 200);
91 int_map.insert("error_code".to_string(), 0);
92
93 let data = TestData {
94 string_map: HashMap::new(),
95 int_map,
96 btree_map: BTreeMap::new(),
97 nested_map: HashMap::new(),
98 };
99
100 // Test with equality operators
101 assert_struct!(data, TestData {
102 int_map: #{
103 "status": == 200,
104 "error_code": != 1,
105 ..
106 },
107 ..
108 });
109}
110
111#[test]
112fn test_btree_map() {

Callers

nothing calls this directly

Calls 1

insertMethod · 0.80

Tested by

no test coverage detected