Lines Matching refs:s

33 test_empty (hb_set_t *s)  in test_empty()  argument
36 g_assert_cmpint (hb_set_get_population (s), ==, 0); in test_empty()
37 g_assert_cmpint (hb_set_get_min (s), ==, HB_SET_VALUE_INVALID); in test_empty()
38 g_assert_cmpint (hb_set_get_max (s), ==, HB_SET_VALUE_INVALID); in test_empty()
39 g_assert (!hb_set_has (s, 13)); in test_empty()
40 g_assert (!hb_set_next (s, &next)); in test_empty()
42 g_assert (hb_set_is_empty (s)); in test_empty()
46 test_not_empty (hb_set_t *s) in test_not_empty() argument
49 g_assert_cmpint (hb_set_get_population (s), !=, 0); in test_not_empty()
50 g_assert_cmpint (hb_set_get_min (s), !=, HB_SET_VALUE_INVALID); in test_not_empty()
51 g_assert_cmpint (hb_set_get_max (s), !=, HB_SET_VALUE_INVALID); in test_not_empty()
52 g_assert (hb_set_next (s, &next)); in test_not_empty()
59 hb_set_t *s = hb_set_create (); in test_set_basic() local
61 test_empty (s); in test_set_basic()
62 hb_set_add (s, 13); in test_set_basic()
63 test_not_empty (s); in test_set_basic()
65 hb_set_clear (s); in test_set_basic()
66 test_empty (s); in test_set_basic()
68 hb_set_add (s, 33000); in test_set_basic()
69 test_not_empty (s); in test_set_basic()
70 hb_set_clear (s); in test_set_basic()
72 hb_set_add_range (s, 10, 29); in test_set_basic()
73 test_not_empty (s); in test_set_basic()
74 g_assert (hb_set_has (s, 13)); in test_set_basic()
75 g_assert_cmpint (hb_set_get_population (s), ==, 20); in test_set_basic()
76 g_assert_cmpint (hb_set_get_min (s), ==, 10); in test_set_basic()
77 g_assert_cmpint (hb_set_get_max (s), ==, 29); in test_set_basic()
79 hb_set_invert (s); in test_set_basic()
80 test_not_empty (s); in test_set_basic()
81 g_assert (!hb_set_has (s, 13)); in test_set_basic()
82 g_assert_cmpint (hb_set_get_min (s), ==, 0); in test_set_basic()
84 hb_set_invert (s); in test_set_basic()
85 test_not_empty (s); in test_set_basic()
86 g_assert (hb_set_has (s, 13)); in test_set_basic()
87 g_assert_cmpint (hb_set_get_population (s), ==, 20); in test_set_basic()
88 g_assert_cmpint (hb_set_get_min (s), ==, 10); in test_set_basic()
89 g_assert_cmpint (hb_set_get_max (s), ==, 29); in test_set_basic()
91 hb_set_del_range (s, 10, 18); in test_set_basic()
92 test_not_empty (s); in test_set_basic()
93 g_assert (!hb_set_has (s, 13)); in test_set_basic()
95 hb_set_destroy (s); in test_set_basic()
101 hb_set_t *s = hb_set_create (); in test_set_algebra() local
107 test_empty (s); in test_set_algebra()
108 g_assert (!hb_set_is_equal (s, o)); in test_set_algebra()
109 hb_set_set (s, o); in test_set_algebra()
110 g_assert (hb_set_is_equal (s, o)); in test_set_algebra()
111 test_not_empty (s); in test_set_algebra()
112 g_assert_cmpint (hb_set_get_population (s), ==, 2); in test_set_algebra()
114 hb_set_clear (s); in test_set_algebra()
115 test_empty (s); in test_set_algebra()
116 hb_set_add (s, 10); in test_set_algebra()
117 g_assert_cmpint (hb_set_get_population (s), ==, 1); in test_set_algebra()
118 hb_set_union (s, o); in test_set_algebra()
119 g_assert_cmpint (hb_set_get_population (s), ==, 3); in test_set_algebra()
120 g_assert (hb_set_has (s, 10)); in test_set_algebra()
121 g_assert (hb_set_has (s, 13)); in test_set_algebra()
123 hb_set_clear (s); in test_set_algebra()
124 test_empty (s); in test_set_algebra()
125 hb_set_add_range (s, 10, 17); in test_set_algebra()
126 g_assert (!hb_set_is_equal (s, o)); in test_set_algebra()
127 hb_set_intersect (s, o); in test_set_algebra()
128 g_assert (!hb_set_is_equal (s, o)); in test_set_algebra()
129 test_not_empty (s); in test_set_algebra()
130 g_assert_cmpint (hb_set_get_population (s), ==, 1); in test_set_algebra()
131 g_assert (!hb_set_has (s, 10)); in test_set_algebra()
132 g_assert (hb_set_has (s, 13)); in test_set_algebra()
134 hb_set_clear (s); in test_set_algebra()
135 test_empty (s); in test_set_algebra()
136 hb_set_add_range (s, 10, 17); in test_set_algebra()
137 g_assert (!hb_set_is_equal (s, o)); in test_set_algebra()
138 hb_set_subtract (s, o); in test_set_algebra()
139 g_assert (!hb_set_is_equal (s, o)); in test_set_algebra()
140 test_not_empty (s); in test_set_algebra()
141 g_assert_cmpint (hb_set_get_population (s), ==, 7); in test_set_algebra()
142 g_assert (hb_set_has (s, 12)); in test_set_algebra()
143 g_assert (!hb_set_has (s, 13)); in test_set_algebra()
144 g_assert (!hb_set_has (s, 19)); in test_set_algebra()
146 hb_set_clear (s); in test_set_algebra()
147 test_empty (s); in test_set_algebra()
148 hb_set_add_range (s, 10, 17); in test_set_algebra()
149 g_assert (!hb_set_is_equal (s, o)); in test_set_algebra()
150 hb_set_symmetric_difference (s, o); in test_set_algebra()
151 g_assert (!hb_set_is_equal (s, o)); in test_set_algebra()
152 test_not_empty (s); in test_set_algebra()
153 g_assert_cmpint (hb_set_get_population (s), ==, 8); in test_set_algebra()
154 g_assert (hb_set_has (s, 12)); in test_set_algebra()
155 g_assert (!hb_set_has (s, 13)); in test_set_algebra()
156 g_assert (hb_set_has (s, 19)); in test_set_algebra()
158 hb_set_destroy (s); in test_set_algebra()
165 hb_set_t *s = hb_set_create (); in test_set_iter() local
167 hb_set_add (s, 13); in test_set_iter()
168 hb_set_add_range (s, 6, 6); in test_set_iter()
169 hb_set_add_range (s, 10, 15); in test_set_iter()
170 hb_set_add (s, 20005); in test_set_iter()
172 test_not_empty (s); in test_set_iter()
175 g_assert (hb_set_next (s, &next)); in test_set_iter()
177 g_assert (hb_set_next (s, &next)); in test_set_iter()
179 g_assert (hb_set_next (s, &next)); in test_set_iter()
180 g_assert (hb_set_next (s, &next)); in test_set_iter()
181 g_assert (hb_set_next (s, &next)); in test_set_iter()
183 g_assert (hb_set_next (s, &next)); in test_set_iter()
184 g_assert (hb_set_next (s, &next)); in test_set_iter()
186 g_assert (hb_set_next (s, &next)); in test_set_iter()
188 g_assert (!hb_set_next (s, &next)); in test_set_iter()
192 g_assert (hb_set_next_range (s, &first, &last)); in test_set_iter()
195 g_assert (hb_set_next_range (s, &first, &last)); in test_set_iter()
198 g_assert (hb_set_next_range (s, &first, &last)); in test_set_iter()
201 g_assert (!hb_set_next_range (s, &first, &last)); in test_set_iter()
205 hb_set_destroy (s); in test_set_iter()