This source file includes following definitions.
- main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include <config.h>
20
21 #include "ino-map.h"
22
23 #include "macros.h"
24
25 int
26 main ()
27 {
28 enum { INO_MAP_INIT = 123 };
29 struct ino_map *ino_map = ino_map_alloc (INO_MAP_INIT);
30 ASSERT (ino_map != NULL);
31
32 ASSERT (ino_map_insert (ino_map, 42) == INO_MAP_INIT);
33 ASSERT (ino_map_insert (ino_map, 42) == INO_MAP_INIT);
34 ASSERT (ino_map_insert (ino_map, 398) == INO_MAP_INIT + 1);
35 ASSERT (ino_map_insert (ino_map, 398) == INO_MAP_INIT + 1);
36 ASSERT (ino_map_insert (ino_map, 0) == INO_MAP_INIT + 2);
37 ASSERT (ino_map_insert (ino_map, 0) == INO_MAP_INIT + 2);
38
39 {
40 int i;
41 for (i = 0; i < 100; i++)
42 {
43 ASSERT (ino_map_insert (ino_map, 10000 + i) == INO_MAP_INIT + 3 + i);
44 }
45 }
46
47 ino_map_free (ino_map);
48
49 return 0;
50 }