Home | History | Annotate | Download | only in api

Lines Matching full:fixture

101 free_up (fixture_t *fixture)
103 g_assert_cmpint (fixture->freed, ==, 0);
104 fixture->freed++;
108 free_up_free (fixture_t *fixture)
110 free_up (fixture);
111 free (fixture->data);
135 free_up_munmap (fixture_t *fixture)
137 free_up (fixture);
138 munmap (fixture->data, get_pagesize ());
144 fixture_init (fixture_t *fixture, gconstpointer user_data)
191 fixture->freed = 0;
192 fixture->data = (char *) data;
193 fixture->len = len;
194 fixture->blob = hb_blob_create (data, len, mm, fixture, free_func);
198 fixture_finish (fixture_t *fixture, gconstpointer user_data)
200 hb_blob_destroy (fixture->blob);
201 g_assert_cmpint (fixture->freed, ==, 1);
206 test_blob (fixture_t *fixture, gconstpointer user_data)
208 hb_blob_t *b = fixture->blob;
218 g_assert_cmpint (len, ==, fixture->len);
221 g_assert_cmpint (len, ==, fixture->len);
223 g_assert (data != fixture->data);
224 g_assert_cmpint (fixture->freed, ==, 1);
227 g_assert (data == fixture->data);
228 g_assert_cmpint (fixture->freed, ==, 0);
232 g_assert_cmpint (len, ==, fixture->len);
234 g_assert (0 == memcmp (data_writable, fixture->data, fixture->len));
237 g_assert_cmpint (fixture->freed, ==, 1);
243 g_assert_cmpint (len, ==, fixture->len);
246 memset (data_writable, 0, fixture->len);
259 g_assert_cmpint (len, ==, fixture->len);
265 test_blob_subblob (fixture_t *fixture, gconstpointer user_data)
267 hb_blob_t *b = fixture->blob;
275 g_assert_cmpint (fixture->freed, ==, 1);
276 fixture->data = (char *) hb_blob_get_data (b, NULL);
278 g_assert_cmpint (fixture->freed, ==, 0);
280 fixture->blob = hb_blob_create_sub_blob (b, 1, fixture->len - 2);
282 b = fixture->blob;
289 g_assert_cmpint (len, ==, fixture->len - 2);
292 g_assert_cmpint (len, ==, fixture->len - 2);
293 g_assert (data == fixture->data + 1);
296 g_assert_cmpint (len, ==, fixture->len - 2);
299 g_assert (0 == memcmp (data_writable, fixture->data + 1, fixture->len - 2));
301 g_assert_cmpint (fixture->freed, ==, 1);
304 g_assert_cmpint (len, ==, fixture->len - 2);
307 memset (data_writable, 0, fixture->len - 2);
320 g_assert_cmpint (len, ==, fixture->len - 2);
340 hb_test_add_fixture_flavor (fixture, blob_type, blob_name, test_blob);
341 hb_test_add_fixture_flavor (fixture, blob_type, blob_name, test_blob_subblob);