Lines Matching refs:map
35 struct wl_map map;
38 wl_map_init(&map, WL_MAP_SERVER_SIDE);
39 i = wl_map_insert_new(&map, 0, &a);
40 j = wl_map_insert_new(&map, 0, &b);
41 k = wl_map_insert_new(&map, 0, &c);
46 assert(wl_map_lookup(&map, i) == &a);
47 assert(wl_map_lookup(&map, j) == &b);
48 assert(wl_map_lookup(&map, k) == &c);
49 wl_map_release(&map);
51 wl_map_init(&map, WL_MAP_CLIENT_SIDE);
52 i = wl_map_insert_new(&map, 0, &a);
54 assert(wl_map_lookup(&map, i) == &a);
56 wl_map_release(&map);
61 struct wl_map map;
64 wl_map_init(&map, WL_MAP_CLIENT_SIDE);
65 assert(wl_map_insert_at(&map, 0, WL_SERVER_ID_START, &a) == 0);
66 assert(wl_map_insert_at(&map, 0, WL_SERVER_ID_START + 3, &b) == -1);
67 assert(wl_map_insert_at(&map, 0, WL_SERVER_ID_START + 1, &c) == 0);
69 assert(wl_map_lookup(&map, WL_SERVER_ID_START) == &a);
70 assert(wl_map_lookup(&map, WL_SERVER_ID_START + 1) == &c);
72 wl_map_release(&map);
77 struct wl_map map;
80 wl_map_init(&map, WL_MAP_SERVER_SIDE);
81 i = wl_map_insert_new(&map, 0, &a);
82 j = wl_map_insert_new(&map, 0, &b);
83 k = wl_map_insert_new(&map, 0, &c);
88 assert(wl_map_lookup(&map, i) == &a);
89 assert(wl_map_lookup(&map, j) == &b);
90 assert(wl_map_lookup(&map, k) == &c);
92 wl_map_remove(&map, j);
93 assert(wl_map_lookup(&map, j) == NULL);
96 l = wl_map_insert_new(&map, 0, &d);
98 assert(wl_map_lookup(&map, l) == &d);
100 wl_map_release(&map);
105 struct wl_map map;
108 wl_map_init(&map, WL_MAP_SERVER_SIDE);
109 i = wl_map_insert_new(&map, 0, &a);
110 j = wl_map_insert_new(&map, 1, &b);
114 assert(wl_map_lookup(&map, i) == &a);
115 assert(wl_map_lookup(&map, j) == &b);
117 assert(wl_map_lookup_flags(&map, i) == 0);
118 assert(wl_map_lookup_flags(&map, j) == 1);
120 wl_map_release(&map);