1 | #include <gtk/gtk.h> |
2 | |
3 | static void |
4 | separator_role (void) |
5 | { |
6 | GtkWidget *widget = gtk_separator_new (orientation: GTK_ORIENTATION_HORIZONTAL); |
7 | g_object_ref_sink (widget); |
8 | |
9 | gtk_test_accessible_assert_role (widget, GTK_ACCESSIBLE_ROLE_SEPARATOR); |
10 | |
11 | g_object_unref (object: widget); |
12 | } |
13 | |
14 | static void |
15 | separator_properties (void) |
16 | { |
17 | GtkWidget *widget = gtk_separator_new (orientation: GTK_ORIENTATION_HORIZONTAL); |
18 | g_object_ref_sink (widget); |
19 | |
20 | gtk_test_accessible_assert_property (widget, GTK_ACCESSIBLE_PROPERTY_ORIENTATION, GTK_ORIENTATION_HORIZONTAL); |
21 | |
22 | gtk_orientable_set_orientation (GTK_ORIENTABLE (widget), orientation: GTK_ORIENTATION_VERTICAL); |
23 | |
24 | gtk_test_accessible_assert_property (widget, GTK_ACCESSIBLE_PROPERTY_ORIENTATION, GTK_ORIENTATION_VERTICAL); |
25 | |
26 | g_object_unref (object: widget); |
27 | } |
28 | |
29 | int |
30 | main (int argc, char *argv[]) |
31 | { |
32 | gtk_test_init (argcp: &argc, argvp: &argv, NULL); |
33 | |
34 | g_test_add_func (testpath: "/a11y/separator/role" , test_func: separator_role); |
35 | g_test_add_func (testpath: "/a11y/separator/properties" , test_func: separator_properties); |
36 | |
37 | return g_test_run (); |
38 | } |
39 | |