46 CSimpleMap<int, int> map1;
57 ok_int(map1.Lookup(-1), 0);
59 ok_int(map1.ReverseLookup(2), 1);
60 ok_int(map1.ReverseLookup(3), 2);
62 ok_int(map1.GetKeyAt(0), 1);
63 ok_int(map1.GetKeyAt(1), 2);
65 ok_int(map1.GetValueAt(0), 2);
66 ok_int(map1.GetValueAt(1), 3);
73 ok_int(map1.ReverseLookup(2), 1);
74 ok_int(map1.ReverseLookup(4), 2);
94 CSimpleMap<CMonster, CMonster> map2;
114 ok_int(map2.GetSize(), 1);
132 ok_int(map2.GetSize(), 2);
138 ok_int(map2.GetSize(), 1);
143 ok_int(map2.GetSize(), 0);
146 CSimpleMap<int, CMonster> map3;
147 ok_int(map3.GetSize(), 0);
153 ok_int(map3.GetSize(), 1);
157 ok_int(map3.GetSize(), 2);
161 ok_int(map3.GetSize(), 3);
165 ok_int(map3.GetSize(), 2);
169 ok_int(map3.GetSize(), 0);
173 ok_int(map1.GetSize(), 1);
175 ok_int(map1.GetSize(), 2);
177 ok(!!map1.RemoveAt(0),
"Expected RemoveAt(0) to succeed\n");
178 ok_int(map1.GetSize(), 1);
179 ok(!!map1.RemoveAt(0),
"Expected RemoveAt(0) to succeed\n");
180 ok_int(map1.GetSize(), 0);
#define ok_int(expression, result)
CMonster & operator=(const CMonster &other)
CMonster(const CMonster &c)