| 110 | |
| 111 | #[test] |
| 112 | fn 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] |
| 132 | fn test_nested_patterns() { |