Bug Summary

File:testsuite/a11y/children.c
Warning:line 172, column 30
1st function call argument is an uninitialized value

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name children.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/rootdir/testsuite/a11y -fcoverage-compilation-dir=/rootdir/testsuite/a11y -resource-dir /usr/lib/llvm-19/lib/clang/19 -D HAVE_CONFIG_H -I . -I ../.. -I ../.. -I ../../cdk -I ../../cdk -D CDK_DISABLE_DEPRECATED -D CTK_DISABLE_DEPRECATED -D CTK_VERSION="3.25.5" -D G_ENABLE_DEBUG -D G_ENABLE_CONSISTENCY_CHECKS -D GLIB_MIN_REQUIRED_VERSION=GLIB_VERSION_2_66 -D GLIB_MAX_ALLOWED_VERSION=GLIB_VERSION_2_66 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/atk-1.0 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/x86_64-linux-gnu -I /usr/include/webp -I /usr/include/at-spi2-atk/2.0 -I /usr/include/at-spi-2.0 -I /usr/include/dbus-1.0 -I /usr/lib/x86_64-linux-gnu/dbus-1.0/include -I /usr/include/gio-unix-2.0 -I /usr/include/harfbuzz -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/sysprof-6 -I /usr/include/pango-1.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/fribidi -I /usr/include/cairo -I /usr/include/pixman-1 -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /rootdir/html-report/2024-12-19-111339-43635-1 -x c children.c
1/*
2 * Copyright (C) 2011 Red Hat Inc.
3 *
4 * Author:
5 * Matthias Clasen <mclasen@redhat.com>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#define CDK_DISABLE_DEPRECATION_WARNINGS
22#undef CTK_DISABLE_DEPRECATED
23
24#include <ctk/ctk.h>
25#include <string.h>
26
27typedef struct
28{
29 CtkWidget *widget;
30 gpointer child[3];
31} STATE;
32
33static void
34test_scrolled_window_child_count (void)
35{
36 CtkWidget *sw;
37 AtkObject *accessible;
38
39 sw = ctk_scrolled_window_new (NULL((void*)0), NULL((void*)0));
40 g_object_ref_sink (sw)((__typeof__ (sw)) (g_object_ref_sink) (sw));
41 ctk_scrolled_window_set_policy (CTK_SCROLLED_WINDOW (sw)((((CtkScrolledWindow*) (void *) g_type_check_instance_cast (
(GTypeInstance*) ((sw)), ((ctk_scrolled_window_get_type ())))
)))
,
42 CTK_POLICY_ALWAYS, CTK_POLICY_ALWAYS);
43 ctk_container_add (CTK_CONTAINER (sw)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((sw)), ((ctk_container_get_type ()))))))
, ctk_label_new ("Bla"));
44
45 accessible = ctk_widget_get_accessible (sw);
46 g_assert_cmpint (atk_object_get_n_accessible_children (accessible), ==, 3)do { gint64 __n1 = (atk_object_get_n_accessible_children (accessible
)), __n2 = (3); if (__n1 == __n2) ; else g_assertion_message_cmpint
(((gchar*) 0), "children.c", 46, ((const char*) (__func__)),
"atk_object_get_n_accessible_children (accessible)" " " "=="
" " "3", (guint64)__n1, "==", (guint64)__n2, 'i'); } while (
0)
;
47
48 g_object_unref (sw);
49}
50
51typedef struct {
52 gint count;
53 gint index;
54 gint n_children;
55 gpointer parent;
56} SignalData;
57
58static void
59children_changed (AtkObject *accessible,
60 guint index,
61 gpointer child G_GNUC_UNUSED__attribute__ ((__unused__)),
62 SignalData *data)
63{
64 data->count++;
65 data->index = index;
66 data->n_children = atk_object_get_n_accessible_children (accessible);
67}
68
69static void
70remove_child (STATE *state,
71 gint i)
72{
73 CtkWidget *child;
74
75 if (CTK_IS_ENTRY (state->widget)(((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) (
(state->widget)); GType __t = ((ctk_entry_get_type ())); gboolean
__r; if (!__inst) __r = (0); else if (__inst->g_class &&
__inst->g_class->g_type == __t) __r = (!(0)); else __r
= g_type_check_instance_is_a (__inst, __t); __r; }))))
)
76 {
77 switch (i)
78 {
79 case 0:
80 ctk_entry_set_icon_from_gicon (CTK_ENTRY (state->widget)((((CtkEntry*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((state->widget)), ((ctk_entry_get_type ()))))))
,
81 CTK_ENTRY_ICON_PRIMARY,
82 NULL((void*)0));
83 return;
84 case 1:
85 ctk_entry_set_icon_from_gicon (CTK_ENTRY (state->widget)((((CtkEntry*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((state->widget)), ((ctk_entry_get_type ()))))))
,
86 CTK_ENTRY_ICON_SECONDARY,
87 NULL((void*)0));
88 return;
89 default:
90 return;
91 }
92 }
93
94 child = state->child [i];
95 if (CTK_IS_SCROLLED_WINDOW (state->widget)(((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) (
(state->widget)); GType __t = ((ctk_scrolled_window_get_type
())); gboolean __r; if (!__inst) __r = (0); else if (__inst->
g_class && __inst->g_class->g_type == __t) __r =
(!(0)); else __r = g_type_check_instance_is_a (__inst, __t);
__r; }))))
)
96 {
97 if (ctk_widget_get_parent (child) != state->widget)
98 child = ctk_widget_get_parent (child);
99 }
100
101 ctk_container_remove (CTK_CONTAINER (state->widget)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((state->widget)), ((ctk_container_get_type ()))))))
, child);
102}
103
104static void
105parent_notify (AtkObject *obj,
106 GParamSpec *pspec G_GNUC_UNUSED__attribute__ ((__unused__)),
107 SignalData *data)
108{
109 data->count++;
110 data->parent = atk_object_get_parent (obj);
111}
112
113gboolean
114do_create_child (STATE *state, gint i)
115{
116 if (CTK_IS_ENTRY (state->widget)(((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) (
(state->widget)); GType __t = ((ctk_entry_get_type ())); gboolean
__r; if (!__inst) __r = (0); else if (__inst->g_class &&
__inst->g_class->g_type == __t) __r = (!(0)); else __r
= g_type_check_instance_is_a (__inst, __t); __r; }))))
)
4
Assuming '__inst' is non-null
5
Taking false branch
6
Assuming field 'g_class' is null
7
Assuming the condition is true
8
Taking true branch
117 {
118 switch (i)
9
Control jumps to 'case 0:' at line 120
119 {
120 case 0:
121 ctk_entry_set_icon_from_icon_name (CTK_ENTRY (state->widget)((((CtkEntry*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((state->widget)), ((ctk_entry_get_type ()))))))
,
122 CTK_ENTRY_ICON_PRIMARY,
123 "dialog-warning-symbolic");
124 return TRUE(!(0));
125 case 1:
126 ctk_entry_set_icon_from_icon_name (CTK_ENTRY (state->widget)((((CtkEntry*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((state->widget)), ((ctk_entry_get_type ()))))))
,
127 CTK_ENTRY_ICON_SECONDARY,
128 "edit-clear");
129 return TRUE(!(0));
130 default:
131 return FALSE(0);
132 }
133 }
134 else if (ctk_container_child_type (CTK_CONTAINER (state->widget)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((state->widget)), ((ctk_container_get_type ()))))))
) == G_TYPE_NONE((GType) ((1) << (2))))
135 return FALSE(0);
136
137 state->child[i] = ctk_label_new ("bla");
138 return TRUE(!(0));
139}
140
141static void
142test_add_remove (CtkWidget *widget)
143{
144 AtkObject *accessible;
145 AtkObject *child_accessible;
146 SignalData add_data;
147 SignalData remove_data;
148 SignalData parent_data[3] = { { 0, }, };
149 STATE state;
150 gint i, j;
151 gint step_children;
152
153 state.widget = widget;
154 accessible = ctk_widget_get_accessible (widget);
155
156 add_data.count = 0;
157 remove_data.count = 0;
158 g_signal_connect (accessible, "children_changed::add",g_signal_connect_data ((accessible), ("children_changed::add"
), (((GCallback) (children_changed))), (&add_data), ((void
*)0), (GConnectFlags) 0)
159 G_CALLBACK (children_changed), &add_data)g_signal_connect_data ((accessible), ("children_changed::add"
), (((GCallback) (children_changed))), (&add_data), ((void
*)0), (GConnectFlags) 0)
;
160 g_signal_connect (accessible, "children_changed::remove",g_signal_connect_data ((accessible), ("children_changed::remove"
), (((GCallback) (children_changed))), (&remove_data), ((
void*)0), (GConnectFlags) 0)
161 G_CALLBACK (children_changed), &remove_data)g_signal_connect_data ((accessible), ("children_changed::remove"
), (((GCallback) (children_changed))), (&remove_data), ((
void*)0), (GConnectFlags) 0)
;
162
163 step_children = atk_object_get_n_accessible_children (accessible);
164
165 for (i = 0; i < 3; i++)
1
The value 0 is assigned to 'i'
2
Loop condition is true. Entering loop body
166 {
167 if (!do_create_child (&state, i))
3
Calling 'do_create_child'
10
Returning from 'do_create_child'
11
Taking false branch
168 break;
169 if (!CTK_IS_ENTRY (widget)(((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) (
(widget)); GType __t = ((ctk_entry_get_type ())); gboolean __r
; if (!__inst) __r = (0); else if (__inst->g_class &&
__inst->g_class->g_type == __t) __r = (!(0)); else __r
= g_type_check_instance_is_a (__inst, __t); __r; }))))
)
12
Taking false branch
13
Assuming field 'g_class' is null
14
Assuming the condition is true
15
Taking true branch
170 {
171 parent_data[i].count = 0;
172 child_accessible = ctk_widget_get_accessible (state.child[i]);
16
1st function call argument is an uninitialized value
173 g_signal_connect (child_accessible, "notify::accessible-parent",g_signal_connect_data ((child_accessible), ("notify::accessible-parent"
), (((GCallback) (parent_notify))), (&(parent_data[i])), (
(void*)0), (GConnectFlags) 0)
174 G_CALLBACK (parent_notify), &(parent_data[i]))g_signal_connect_data ((child_accessible), ("notify::accessible-parent"
), (((GCallback) (parent_notify))), (&(parent_data[i])), (
(void*)0), (GConnectFlags) 0)
;
175 ctk_container_add (CTK_CONTAINER (widget)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((widget)), ((ctk_container_get_type ()))))))
, state.child[i]);
176 }
177 else
178 child_accessible = atk_object_ref_accessible_child (accessible, i);
179
180 g_assert_cmpint (add_data.count, ==, i + 1)do { gint64 __n1 = (add_data.count), __n2 = (i + 1); if (__n1
== __n2) ; else g_assertion_message_cmpint (((gchar*) 0), "children.c"
, 180, ((const char*) (__func__)), "add_data.count" " " "==" " "
"i + 1", (guint64)__n1, "==", (guint64)__n2, 'i'); } while (
0)
;
181 g_assert_cmpint (add_data.n_children, ==, step_children + i + 1)do { gint64 __n1 = (add_data.n_children), __n2 = (step_children
+ i + 1); if (__n1 == __n2) ; else g_assertion_message_cmpint
(((gchar*) 0), "children.c", 181, ((const char*) (__func__))
, "add_data.n_children" " " "==" " " "step_children + i + 1",
(guint64)__n1, "==", (guint64)__n2, 'i'); } while (0)
;
182 g_assert_cmpint (remove_data.count, ==, 0)do { gint64 __n1 = (remove_data.count), __n2 = (0); if (__n1 ==
__n2) ; else g_assertion_message_cmpint (((gchar*) 0), "children.c"
, 182, ((const char*) (__func__)), "remove_data.count" " " "=="
" " "0", (guint64)__n1, "==", (guint64)__n2, 'i'); } while (
0)
;
183 if (!CTK_IS_ENTRY (widget)(((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) (
(widget)); GType __t = ((ctk_entry_get_type ())); gboolean __r
; if (!__inst) __r = (0); else if (__inst->g_class &&
__inst->g_class->g_type == __t) __r = (!(0)); else __r
= g_type_check_instance_is_a (__inst, __t); __r; }))))
)
184 g_assert_cmpint (parent_data[i].count, ==, 1)do { gint64 __n1 = (parent_data[i].count), __n2 = (1); if (__n1
== __n2) ; else g_assertion_message_cmpint (((gchar*) 0), "children.c"
, 184, ((const char*) (__func__)), "parent_data[i].count" " "
"==" " " "1", (guint64)__n1, "==", (guint64)__n2, 'i'); } while
(0)
;
185 if (CTK_IS_SCROLLED_WINDOW (widget)(((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) (
(widget)); GType __t = ((ctk_scrolled_window_get_type ())); gboolean
__r; if (!__inst) __r = (0); else if (__inst->g_class &&
__inst->g_class->g_type == __t) __r = (!(0)); else __r
= g_type_check_instance_is_a (__inst, __t); __r; }))))
||
186 CTK_IS_NOTEBOOK (widget)(((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) (
(widget)); GType __t = ((ctk_notebook_get_type ())); gboolean
__r; if (!__inst) __r = (0); else if (__inst->g_class &&
__inst->g_class->g_type == __t) __r = (!(0)); else __r
= g_type_check_instance_is_a (__inst, __t); __r; }))))
)
187 g_assert (atk_object_get_parent (ATK_OBJECT (parent_data[i].parent)) == accessible)do { if (atk_object_get_parent (((((AtkObject*) (void *) g_type_check_instance_cast
((GTypeInstance*) ((parent_data[i].parent)), ((atk_object_get_type
()))))))) == accessible) ; else g_assertion_message_expr (((
gchar*) 0), "children.c", 187, ((const char*) (__func__)), "atk_object_get_parent (ATK_OBJECT (parent_data[i].parent)) == accessible"
); } while (0)
;
188 else if (CTK_IS_ENTRY (widget)(((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) (
(widget)); GType __t = ((ctk_entry_get_type ())); gboolean __r
; if (!__inst) __r = (0); else if (__inst->g_class &&
__inst->g_class->g_type == __t) __r = (!(0)); else __r
= g_type_check_instance_is_a (__inst, __t); __r; }))))
)
189 g_assert (atk_object_get_parent (child_accessible) == accessible)do { if (atk_object_get_parent (child_accessible) == accessible
) ; else g_assertion_message_expr (((gchar*) 0), "children.c"
, 189, ((const char*) (__func__)), "atk_object_get_parent (child_accessible) == accessible"
); } while (0)
;
190 else
191 g_assert (parent_data[i].parent == accessible)do { if (parent_data[i].parent == accessible) ; else g_assertion_message_expr
(((gchar*) 0), "children.c", 191, ((const char*) (__func__))
, "parent_data[i].parent == accessible"); } while (0)
;
192
193 if (CTK_IS_ENTRY (widget)(((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) (
(widget)); GType __t = ((ctk_entry_get_type ())); gboolean __r
; if (!__inst) __r = (0); else if (__inst->g_class &&
__inst->g_class->g_type == __t) __r = (!(0)); else __r
= g_type_check_instance_is_a (__inst, __t); __r; }))))
)
194 g_object_unref (child_accessible);
195 }
196 for (j = 0 ; j < i; j++)
197 {
198 remove_child (&state, j);
199 g_assert_cmpint (add_data.count, ==, i)do { gint64 __n1 = (add_data.count), __n2 = (i); if (__n1 == __n2
) ; else g_assertion_message_cmpint (((gchar*) 0), "children.c"
, 199, ((const char*) (__func__)), "add_data.count" " " "==" " "
"i", (guint64)__n1, "==", (guint64)__n2, 'i'); } while (0)
;
200 g_assert_cmpint (remove_data.count, ==, j + 1)do { gint64 __n1 = (remove_data.count), __n2 = (j + 1); if (__n1
== __n2) ; else g_assertion_message_cmpint (((gchar*) 0), "children.c"
, 200, ((const char*) (__func__)), "remove_data.count" " " "=="
" " "j + 1", (guint64)__n1, "==", (guint64)__n2, 'i'); } while
(0)
;
201 g_assert_cmpint (remove_data.n_children, ==, step_children + i - j - 1)do { gint64 __n1 = (remove_data.n_children), __n2 = (step_children
+ i - j - 1); if (__n1 == __n2) ; else g_assertion_message_cmpint
(((gchar*) 0), "children.c", 201, ((const char*) (__func__))
, "remove_data.n_children" " " "==" " " "step_children + i - j - 1"
, (guint64)__n1, "==", (guint64)__n2, 'i'); } while (0)
;
202 if (parent_data[j].count == 2)
203 g_assert (parent_data[j].parent == NULL)do { if (parent_data[j].parent == ((void*)0)) ; else g_assertion_message_expr
(((gchar*) 0), "children.c", 203, ((const char*) (__func__))
, "parent_data[j].parent == NULL"); } while (0)
;
204 else if (!CTK_IS_ENTRY (widget)(((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) (
(widget)); GType __t = ((ctk_entry_get_type ())); gboolean __r
; if (!__inst) __r = (0); else if (__inst->g_class &&
__inst->g_class->g_type == __t) __r = (!(0)); else __r
= g_type_check_instance_is_a (__inst, __t); __r; }))))
)
205 {
206 AtkStateSet *set;
207 set = atk_object_ref_state_set (ATK_OBJECT (parent_data[j].parent)((((AtkObject*) (void *) g_type_check_instance_cast ((GTypeInstance
*) ((parent_data[j].parent)), ((atk_object_get_type ()))))))
);
208 g_assert (atk_state_set_contains_state (set, ATK_STATE_DEFUNCT))do { if (atk_state_set_contains_state (set, ATK_STATE_DEFUNCT
)) ; else g_assertion_message_expr (((gchar*) 0), "children.c"
, 208, ((const char*) (__func__)), "atk_state_set_contains_state (set, ATK_STATE_DEFUNCT)"
); } while (0)
;
209 g_object_unref (set);
210 }
211 }
212
213 g_signal_handlers_disconnect_by_func (accessible, G_CALLBACK (children_changed), &add_data)g_signal_handlers_disconnect_matched ((accessible), (GSignalMatchType
) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), 0, 0, ((void*)
0), (((GCallback) (children_changed))), (&add_data))
;
214 g_signal_handlers_disconnect_by_func (accessible, G_CALLBACK (children_changed), &remove_data)g_signal_handlers_disconnect_matched ((accessible), (GSignalMatchType
) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), 0, 0, ((void*)
0), (((GCallback) (children_changed))), (&remove_data))
;
215}
216
217static void
218add_child_test (const gchar *prefix,
219 GTestFixtureFunc test_func,
220 CtkWidget *widget)
221{
222 gchar *path;
223
224 path = g_strdup_printf ("%s/%s", prefix, G_OBJECT_TYPE_NAME (widget)(g_type_name ((((((GTypeClass*) (((GTypeInstance*) (widget))->
g_class))->g_type)))))
);
225 g_test_add_vtable (path,
226 0,
227 g_object_ref (widget)((__typeof__ (widget)) (g_object_ref) (widget)),
228 0,
229 (GTestFixtureFunc) test_func,
230 (GTestFixtureFunc) g_object_unref);
231 g_free (path);
232}
233
234static void
235add_child_tests (CtkWidget *widget)
236{
237 g_object_ref_sink (widget)((__typeof__ (widget)) (g_object_ref_sink) (widget));
238 add_child_test ("/child/add-remove", (GTestFixtureFunc)test_add_remove, widget);
239 g_object_unref (widget);
240}
241
242int
243main (int argc, char *argv[])
244{
245 ctk_test_init (&argc, &argv, NULL((void*)0));
246
247 g_test_add_func ("/scrolledwindow/child-count", test_scrolled_window_child_count);
248
249 add_child_tests (ctk_scrolled_window_new (NULL((void*)0), NULL((void*)0)));
250 add_child_tests (ctk_box_new (CTK_ORIENTATION_HORIZONTAL, 0));
251 add_child_tests (ctk_paned_new (CTK_ORIENTATION_HORIZONTAL));
252 add_child_tests (ctk_grid_new ());
253 add_child_tests (ctk_event_box_new ());
254 add_child_tests (ctk_window_new (CTK_WINDOW_TOPLEVEL));
255 add_child_tests (ctk_assistant_new ());
256 add_child_tests (ctk_frame_new ("frame"));
257 add_child_tests (ctk_expander_new ("expander"));
258 add_child_tests (ctk_table_new (2, 2, FALSE(0)));
259 add_child_tests (ctk_text_view_new ());
260 add_child_tests (ctk_tree_view_new ());
261#if 0
262 /* cail doesn't handle non-label children in these */
263 add_child_tests (ctk_button_new ());
264 add_child_tests (ctk_statusbar_new ());
265#endif
266 add_child_tests (ctk_notebook_new ());
267 add_child_tests (ctk_entry_new ());
268
269 return g_test_run ();
270}
271