Home
last modified time | relevance | path

Searched refs:g_assert (Results 1 – 25 of 145) sorted by relevance

123456

/external/bluetooth/glib/tests/
Dconvert-test.c52 g_assert (bytes_read == 5); in test_iconv_state()
53 g_assert (bytes_written == 10); in test_iconv_state()
54 g_assert (strcmp (out, expected) == 0); in test_iconv_state()
74 g_assert (bytes_read == 2); in test_one_half()
75 g_assert (bytes_written == 1); in test_one_half()
76 g_assert (strcmp (out, "\xbd") == 0); in test_one_half()
85 g_assert (bytes_read == 0); in test_one_half()
86 g_assert (bytes_written == 0); in test_one_half()
87 g_assert (out == NULL); in test_one_half()
98 g_assert (bytes_read == 2); in test_one_half()
[all …]
Datomic-test.c20 g_assert (atomic == 10); in main()
22 g_assert (!g_atomic_int_dec_and_test (&atomic)); in main()
23 g_assert (g_atomic_int_dec_and_test (&atomic)); in main()
24 g_assert (atomic == 0); in main()
26 g_assert (g_atomic_int_exchange_and_add (&atomic, 5) == 0); in main()
27 g_assert (atomic == 5); in main()
29 g_assert (g_atomic_int_exchange_and_add (&atomic, -10) == 5); in main()
30 g_assert (atomic == -5); in main()
33 g_assert (atomic == 15); in main()
36 g_assert (atomic == -20); in main()
[all …]
Dutf8-pointer.c38 g_assert (g_utf8_validate (string, -1, NULL)); in test_utf8()
51 g_assert (g_utf8_offset_to_pointer (p[i], j - i) == p[j]); in test_utf8()
52 g_assert (g_utf8_pointer_to_offset (p[i], p[j]) == j - i); in test_utf8()
71 g_assert (g_utf8_strlen ("1234", -1) == 4); in test_length()
72 g_assert (g_utf8_strlen ("1234", 0) == 0); in test_length()
73 g_assert (g_utf8_strlen ("1234", 1) == 1); in test_length()
74 g_assert (g_utf8_strlen ("1234", 2) == 2); in test_length()
75 g_assert (g_utf8_strlen ("1234", 3) == 3); in test_length()
76 g_assert (g_utf8_strlen ("1234", 4) == 4); in test_length()
77 g_assert (g_utf8_strlen ("1234", 5) == 4); in test_length()
[all …]
Dqueue-test.c22 g_assert (queue->length < 4000000000u); in check_integrity()
24 g_assert (g_queue_get_length (queue) == queue->length); in check_integrity()
27 g_assert (!queue->tail); in check_integrity()
29 g_assert (!queue->head); in check_integrity()
39 g_assert (n == queue->length); in check_integrity()
40 g_assert (last == queue->tail); in check_integrity()
50 g_assert (n == queue->length); in check_integrity()
51 g_assert (last == queue->head); in check_integrity()
60 g_assert (list == link->data); in check_integrity()
72 g_assert (list == link->data); in check_integrity()
[all …]
Dtestglib.c269 g_assert (g_node_depth (root) == 1 && g_node_max_height (root) == 1); in gnode_test()
273 g_assert (root->children == node_B); in gnode_test()
281 g_assert (root->children->next == node_F); in gnode_test()
291 g_assert (g_node_depth (root) == 1); in gnode_test()
292 g_assert (g_node_max_height (root) == 4); in gnode_test()
293 g_assert (g_node_depth (node_G->children->next) == 4); in gnode_test()
294 g_assert (g_node_n_nodes (root, G_TRAVERSE_LEAFS) == 7); in gnode_test()
295 g_assert (g_node_n_nodes (root, G_TRAVERSE_NON_LEAFS) == 4); in gnode_test()
296 g_assert (g_node_n_nodes (root, G_TRAVERSE_ALL) == 11); in gnode_test()
297 g_assert (g_node_max_height (node_F) == 3); in gnode_test()
[all …]
Dhash-test.c74 g_assert (array[i] == i); in verify_result_array()
82 g_assert (key == value); in handle_pair()
86 g_assert (n >= 0 && n < 10000); in handle_pair()
87 g_assert (result_array[n] == -1); in handle_pair()
193 g_assert (name != NULL); in honeyman_hash()
194 g_assert (*name != 0); in honeyman_hash()
228 g_assert (_key != NULL); in not_even_foreach()
229 g_assert (*_key != 0); in not_even_foreach()
230 g_assert (_value != NULL); in not_even_foreach()
231 g_assert (*_value != 0); in not_even_foreach()
[all …]
Dtree-test.c73 g_assert ((*ch) > 0); in my_traverse()
94 g_assert (**p == *ch); in check_order()
120 g_assert (g_tree_nnodes (tree) == strlen (chars)); in main()
121 g_assert (g_tree_height (tree) == 6); in main()
129 g_assert (removed); in main()
134 g_assert (removed == FALSE); in main()
138 g_assert (g_tree_nnodes (tree) == strlen (chars2)); in main()
139 g_assert (g_tree_height (tree) == 6); in main()
152 g_assert (p && *p == c); in main()
156 g_assert (p && *p == c); in main()
[all …]
Dtype-test.c64 g_assert (sizeof (gint8) == 1); in main()
65 g_assert (sizeof (gint16) == 2); in main()
66 g_assert (sizeof (gint32) == 4); in main()
67 g_assert (sizeof (gint64) == 8); in main()
69 g_assert (GUINT16_SWAP_LE_BE (gu16t1) == gu16t2); in main()
70 g_assert (GUINT32_SWAP_LE_BE (gu32t1) == gu32t2); in main()
71 g_assert (GUINT64_SWAP_LE_BE (gu64t1) == gu64t2); in main()
77 g_assert (gus == 0); in main()
81 g_assert (gui == 0); in main()
85 g_assert (gul == 0); in main()
[all …]
Denv-test.c56 g_assert (data == NULL && "TEST_G_SETENV already set"); in main()
59 g_assert (result && "g_setenv() failed"); in main()
62 g_assert (data != NULL && "g_getenv() returns NULL"); in main()
63 g_assert (strcmp (data, value1) == 0 && "g_getenv() returns wrong value"); in main()
66 g_assert (result && "g_setenv() failed"); in main()
69 g_assert (data != NULL && "g_getenv() returns NULL"); in main()
70 g_assert (strcmp (data, value2) != 0 && "g_setenv() always overwrites"); in main()
71 g_assert (strcmp (data, value1) == 0 && "g_getenv() returns wrong value"); in main()
74 g_assert (result && "g_setenv() failed"); in main()
77 g_assert (data != NULL && "g_getenv() returns NULL"); in main()
[all …]
Dfile-test.c74 g_assert (fd != -1 && "g_mkstemp didn't work for template fooXXXXXX"); in test_mkstemp()
76 g_assert (i != -1 && "write() failed"); in test_mkstemp()
77 g_assert (i == hellolen && "write() has written too few bytes"); in test_mkstemp()
81 g_assert (i != -1 && "read() failed: %s"); in test_mkstemp()
82 g_assert (i == hellolen && "read() has got wrong number of bytes"); in test_mkstemp()
85 g_assert (strcmp (chars, hello) == 0 && "read() didn't get same string back"); in test_mkstemp()
92 g_assert (fd != -1 && "g_mkstemp didn't work for template fooXXXXXX.pdf"); in test_mkstemp()
112 g_assert (file != NULL && "fopen() failed"); in test_readlink()
116 g_assert (result == 0 && "symlink() failed"); in test_readlink()
118 g_assert (result == 0 && "symlink() failed"); in test_readlink()
[all …]
Drelation-test.c87 g_assert (! g_relation_exists (relation, data + i, data + i)); in main()
88 g_assert (! g_relation_exists (relation, data + i, data + i + 2)); in main()
89 g_assert (! g_relation_exists (relation, data + i, data + i - 2)); in main()
94 g_assert (g_relation_exists (relation, data + i, data + i + 1)); in main()
95 g_assert (g_relation_exists (relation, data + i, data + i - 1)); in main()
100 g_assert (g_relation_count (relation, data + i, 0) == 2); in main()
101 g_assert (g_relation_count (relation, data + i, 1) == 2); in main()
104 g_assert (g_relation_count (relation, data, 0) == 0); in main()
106 g_assert (g_relation_count (relation, data + 42, 0) == 2); in main()
107 g_assert (g_relation_count (relation, data + 43, 1) == 2); in main()
[all …]
Dsequence-test.c45 g_assert (node->parent != node); in check_node()
47 g_assert (node->parent->left == node || node->parent->right == node); in check_node()
48g_assert (node->n_nodes == 1 + (node->left ? node->left->n_nodes : 0) + (node->right ? node->right… in check_node()
50 g_assert (get_priority (node) >= get_priority (node->left)); in check_node()
52 g_assert (get_priority (node) >= get_priority (node->right)); in check_node()
71 g_assert (seq->end_node == node); in g_sequence_check()
72 g_assert (node->data == seq); in g_sequence_check()
136 g_assert (info->n_items == g_queue_get_length (info->queue)); in check_integrity()
137 g_assert (g_sequence_get_length (info->sequence) == info->n_items); in check_integrity()
145 g_assert (list->data == iter); in check_integrity()
[all …]
/external/bluetooth/glib/gio/tests/
Dfilter-streams.c29 g_assert (g_filter_input_stream_get_base_stream (G_FILTER_INPUT_STREAM (f1)) == base); in test_input_filter()
30 g_assert (g_filter_input_stream_get_base_stream (G_FILTER_INPUT_STREAM (f2)) == base); in test_input_filter()
32 g_assert (!g_input_stream_is_closed (base)); in test_input_filter()
33 g_assert (!g_input_stream_is_closed (f1)); in test_input_filter()
34 g_assert (!g_input_stream_is_closed (f2)); in test_input_filter()
38 g_assert (!g_input_stream_is_closed (base)); in test_input_filter()
39 g_assert (!g_input_stream_is_closed (f2)); in test_input_filter()
43 g_assert (g_input_stream_is_closed (base)); in test_input_filter()
59 g_assert (g_filter_output_stream_get_base_stream (G_FILTER_OUTPUT_STREAM (f1)) == base); in test_output_filter()
60 g_assert (g_filter_output_stream_get_base_stream (G_FILTER_OUTPUT_STREAM (f2)) == base); in test_output_filter()
[all …]
Ddesktop-app-info.c41 g_assert (error == NULL); in create_app_info()
45 g_assert (error == NULL); in create_app_info()
47 g_assert (error == NULL); in create_app_info()
65 g_assert (id != NULL); in test_delete()
70 g_assert (res); in test_delete()
73 g_assert (res); in test_delete()
76 g_assert (res); in test_delete()
79 g_assert (!res); in test_delete()
86 g_assert (info); in test_delete()
89 g_assert (!res); in test_delete()
[all …]
Dg-file-info.c40 g_assert (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_NAME) == TRUE); in test_assigned_values()
41 g_assert (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME) == TRUE); in test_assigned_values()
42 g_assert (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_SIZE) == TRUE); in test_assigned_values()
43 g_assert (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_COPY_NAME) == FALSE); in test_assigned_values()
55 g_assert (mistake == NULL); in test_assigned_values()
77 g_assert (attr_list != NULL); in test_g_file_info()
78 g_assert (*attr_list == NULL); in test_g_file_info()
87 g_assert (attr_list != NULL); in test_g_file_info()
88 g_assert (*attr_list != NULL); in test_g_file_info()
94 g_assert (info_dup != NULL); in test_g_file_info()
[all …]
/external/bluetooth/glib/tests/gobject/
Dreferences.c101 g_assert (object == global_object); in weak_ref1()
102 g_assert (data == GUINT_TO_POINTER (42)); in weak_ref1()
111 g_assert (object == global_object); in weak_ref2()
112 g_assert (data == GUINT_TO_POINTER (24)); in weak_ref2()
122 g_assert (object == global_object); in toggle_ref1()
123 g_assert (data == GUINT_TO_POINTER (42)); in toggle_ref1()
136 g_assert (object == global_object); in toggle_ref2()
137 g_assert (data == GUINT_TO_POINTER (24)); in toggle_ref2()
150 g_assert (object == global_object); in toggle_ref3()
151 g_assert (data == GUINT_TO_POINTER (34)); in toggle_ref3()
[all …]
Dgvalue-test.c52 g_assert (g_value_get_char (&xform) == 1); in test_enum_transformation()
57 g_assert (g_value_get_uchar (&xform) == 1); in test_enum_transformation()
62 g_assert (g_value_get_int (&xform) == 1); in test_enum_transformation()
67 g_assert (g_value_get_uint (&xform) == 1); in test_enum_transformation()
72 g_assert (g_value_get_long (&xform) == 1); in test_enum_transformation()
77 g_assert (g_value_get_ulong (&xform) == 1); in test_enum_transformation()
82 g_assert (g_value_get_int64 (&xform) == 1); in test_enum_transformation()
87 g_assert (g_value_get_uint64 (&xform) == 1); in test_enum_transformation()
102 g_assert (type == G_TYPE_BOXED); in test_gtype_value()
107 g_assert (type == G_TYPE_BOXED); in test_gtype_value()
[all …]
Dparamspec-test.c45 g_assert (strcmp (g_param_spec_get_name (pspec), "char") == 0); in test_param_spec_char()
46 g_assert (strcmp (g_param_spec_get_nick (pspec), "nick") == 0); in test_param_spec_char()
47 g_assert (strcmp (g_param_spec_get_blurb (pspec), "blurb") == 0); in test_param_spec_char()
52 g_assert (g_param_value_defaults (pspec, &value)); in test_param_spec_char()
56 g_assert (modified && g_value_get_char (&value) == 20); in test_param_spec_char()
60 g_assert (!modified && g_value_get_char (&value) == 20); in test_param_spec_char()
64 g_assert (!modified && g_value_get_char (&value) == 40); in test_param_spec_char()
68 g_assert (modified && g_value_get_char (&value) == 40); in test_param_spec_char()
86 g_assert (!modified); in test_param_spec_string()
90 g_assert (!modified && g_value_get_string (&value) != NULL); in test_param_spec_string()
[all …]
Difaceproperties.c167 g_assert (n_construct_properties == 1); in DEFINE_IFACE()
173 g_assert (G_IS_PARAM_SPEC_OVERRIDE (pspec)); in DEFINE_IFACE()
174 g_assert (pspec->param_id == BASE_PROP1); in DEFINE_IFACE()
175 g_assert (strcmp (g_param_spec_get_name (pspec), "prop1") == 0); in DEFINE_IFACE()
176 g_assert (g_param_spec_get_redirect_target (pspec) == iface_spec1); in DEFINE_IFACE()
180 g_assert (strcmp (g_param_spec_get_nick (pspec), "Prop1") == 0); in DEFINE_IFACE()
181 g_assert (strcmp (g_param_spec_get_blurb (pspec), "Property 1") == 0); in DEFINE_IFACE()
189 g_assert (g_value_get_int (&value1) == 42); in DEFINE_IFACE()
193 g_assert (g_param_value_validate (pspec, &value1)); in DEFINE_IFACE()
194 g_assert (g_value_get_int (&value1) == 0xFFFF); in DEFINE_IFACE()
[all …]
Ddynamictype.c85 g_assert (class == NULL); in test_dynamic_type()
86 g_assert (!loaded); in test_dynamic_type()
90 g_assert (class && class->val == 42); in test_dynamic_type()
91 g_assert (loaded); in test_dynamic_type()
95 g_assert (class && class->val == 42); in test_dynamic_type()
96 g_assert (loaded); in test_dynamic_type()
103 g_assert (!class); in test_dynamic_type()
104 g_assert (!loaded); in test_dynamic_type()
108 g_assert (class && class->val == 42); in test_dynamic_type()
109 g_assert (loaded); in test_dynamic_type()
[all …]
/external/webkit/Source/WebKit/gtk/tests/
Dtestatk.c246 g_assert(object); in testWebkitAtkCaretOffsets()
249 g_assert(ATK_IS_TEXT(header)); in testWebkitAtkCaretOffsets()
261 g_assert(ATK_IS_TEXT(paragraph)); in testWebkitAtkCaretOffsets()
283 g_assert(ATK_OBJECT(list)); in testWebkitAtkCaretOffsets()
284 g_assert(atk_object_get_role(list) == ATK_ROLE_LIST); in testWebkitAtkCaretOffsets()
288 g_assert(ATK_IS_TEXT(listItem)); in testWebkitAtkCaretOffsets()
304 g_assert(ATK_IS_OBJECT(panel)); in testWebkitAtkCaretOffsets()
305 g_assert(atk_object_get_role(panel) == ATK_ROLE_PANEL); in testWebkitAtkCaretOffsets()
308 g_assert(ATK_IS_OBJECT(comboBox)); in testWebkitAtkCaretOffsets()
309 g_assert(atk_object_get_role(comboBox) == ATK_ROLE_COMBO_BOX); in testWebkitAtkCaretOffsets()
[all …]
Dtestdomdocument.c71 g_assert(fixture); in test_dom_document_title()
73 g_assert(view); in test_dom_document_title()
75 g_assert(document); in test_dom_document_title()
77 g_assert(title); in test_dom_document_title()
82 g_assert(title); in test_dom_document_title()
89 g_assert(fixture); in test_dom_document_get_elements_by_tag_name()
91 g_assert(view); in test_dom_document_get_elements_by_tag_name()
93 g_assert(document); in test_dom_document_get_elements_by_tag_name()
95 g_assert(list); in test_dom_document_get_elements_by_tag_name()
103 g_assert(item); in test_dom_document_get_elements_by_tag_name()
[all …]
Dtestwebbackforwardlist.c126 g_assert(webBackForwardList); in test_webkit_web_back_forward_list_order()
129 g_assert(!webkit_web_back_forward_list_get_current_item(webBackForwardList)); in test_webkit_web_back_forward_list_order()
132 g_assert(!webkit_web_view_can_go_forward(webView)); in test_webkit_web_back_forward_list_order()
133 g_assert(!webkit_web_view_can_go_back(webView)); in test_webkit_web_back_forward_list_order()
139 g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, item1)); in test_webkit_web_back_forward_list_order()
144 g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, item2)); in test_webkit_web_back_forward_list_order()
149 g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, item3)); in test_webkit_web_back_forward_list_order()
154 g_assert(webkit_web_back_forward_list_contains_item(webBackForwardList, item4)); in test_webkit_web_back_forward_list_order()
158 g_assert(backList); in test_webkit_web_back_forward_list_order()
176 g_assert(webkit_web_view_go_to_back_forward_item(webView, item1)); in test_webkit_web_back_forward_list_order()
[all …]
Dtestdomnode.c74 g_assert(document); in test_dom_node_hierarchy_navigation()
75 g_assert(WEBKIT_DOM_IS_DOCUMENT(document)); in test_dom_node_hierarchy_navigation()
77 g_assert(head); in test_dom_node_hierarchy_navigation()
78 g_assert(WEBKIT_DOM_IS_HTML_HEAD_ELEMENT(head)); in test_dom_node_hierarchy_navigation()
81 g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(head))); in test_dom_node_hierarchy_navigation()
85 g_assert(ptr); in test_dom_node_hierarchy_navigation()
86 g_assert(WEBKIT_DOM_IS_HTML_TITLE_ELEMENT(ptr)); in test_dom_node_hierarchy_navigation()
91 g_assert(ptr); in test_dom_node_hierarchy_navigation()
93 g_assert(WEBKIT_DOM_IS_HTML_BODY_ELEMENT(body)); in test_dom_node_hierarchy_navigation()
97 g_assert(ptr == NULL); in test_dom_node_hierarchy_navigation()
[all …]
Dtestloading.c105 g_assert(fixture->has_been_provisional); in load_finished_cb()
106 g_assert(fixture->has_been_committed); in load_finished_cb()
107 g_assert(fixture->has_been_first_visually_non_empty_layout); in load_finished_cb()
119 g_assert(!fixture->has_been_provisional); in status_changed_cb()
120 g_assert(!fixture->has_been_committed); in status_changed_cb()
121 g_assert(!fixture->has_been_first_visually_non_empty_layout); in status_changed_cb()
125 g_assert(fixture->has_been_provisional); in status_changed_cb()
126 g_assert(!fixture->has_been_committed); in status_changed_cb()
127 g_assert(!fixture->has_been_first_visually_non_empty_layout); in status_changed_cb()
131 g_assert(fixture->has_been_provisional); in status_changed_cb()
[all …]

123456