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

Function test_map_with_comparison_operators

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

Source from the content-addressed store, hash-verified

60
61#[test]
62fn test_map_with_comparison_operators() {
63 let mut int_map = HashMap::new();
64 int_map.insert("count".to_string(), 42);
65 int_map.insert("score".to_string(), 95);
66 int_map.insert("level".to_string(), 3);
67
68 let data = TestData {
69 string_map: HashMap::new(),
70 int_map,
71 btree_map: BTreeMap::new(),
72 nested_map: HashMap::new(),
73 };
74
75 // Test with comparison operators
76 assert_struct!(data, TestData {
77 int_map: #{
78 "count": > 40,
79 "score": >= 90,
80 "level": <= 5,
81 ..
82 },
83 ..
84 });
85}
86
87#[test]
88fn test_map_with_equality_operators() {

Callers

nothing calls this directly

Calls 1

insertMethod · 0.80

Tested by

no test coverage detected