| 1153 | {(A, 'a'), (B, 'b'), (C, 'c'), (D, 'd'), (E, 'e'), (F, 'f')}) |
| 1154 | |
| 1155 | def test_hamt_keys_1(self): |
| 1156 | A = HashKey(100, 'A') |
| 1157 | B = HashKey(101, 'B') |
| 1158 | C = HashKey(100100, 'C') |
| 1159 | D = HashKey(100100, 'D') |
| 1160 | E = HashKey(100100, 'E') |
| 1161 | F = HashKey(110, 'F') |
| 1162 | |
| 1163 | h = hamt() |
| 1164 | h = h.set(A, 'a') |
| 1165 | h = h.set(B, 'b') |
| 1166 | h = h.set(C, 'c') |
| 1167 | h = h.set(D, 'd') |
| 1168 | h = h.set(E, 'e') |
| 1169 | h = h.set(F, 'f') |
| 1170 | |
| 1171 | self.assertEqual(set(list(h.keys())), {A, B, C, D, E, F}) |
| 1172 | self.assertEqual(set(list(h)), {A, B, C, D, E, F}) |
| 1173 | |
| 1174 | def test_hamt_items_3(self): |
| 1175 | h = hamt() |