| 1132 | {(A, 'a'), (B, 'b'), (C, 'c'), (D, 'd'), (E, 'e'), (F, 'f')}) |
| 1133 | |
| 1134 | def test_hamt_items_2(self): |
| 1135 | A = HashKey(100, 'A') |
| 1136 | B = HashKey(101, 'B') |
| 1137 | C = HashKey(100100, 'C') |
| 1138 | D = HashKey(100100, 'D') |
| 1139 | E = HashKey(100100, 'E') |
| 1140 | F = HashKey(110, 'F') |
| 1141 | |
| 1142 | h = hamt() |
| 1143 | h = h.set(A, 'a') |
| 1144 | h = h.set(B, 'b') |
| 1145 | h = h.set(C, 'c') |
| 1146 | h = h.set(D, 'd') |
| 1147 | h = h.set(E, 'e') |
| 1148 | h = h.set(F, 'f') |
| 1149 | |
| 1150 | it = h.items() |
| 1151 | self.assertEqual( |
| 1152 | set(list(it)), |
| 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') |