Branch data Line data Source code
1 : : #undef G_DISABLE_ASSERT 2 : : 3 : : #include <gtk/gtk.h> 4 : : #include <shumate/shumate.h> 5 : : 6 : : static void 7 : 2 : test_marker_child (void) 8 : : { 9 : 2 : ShumateMarker *marker; 10 : 2 : GtkWidget *button; 11 : : 12 : 2 : marker = shumate_marker_new (); 13 [ - + ]: 2 : g_assert_null (gtk_widget_get_first_child (GTK_WIDGET (marker))); 14 : : 15 : 2 : button = gtk_button_new (); 16 : 2 : shumate_marker_set_child (marker, button); 17 [ - + ]: 2 : g_assert_true (gtk_widget_get_first_child (GTK_WIDGET (marker)) == button); 18 : : 19 : 2 : shumate_marker_set_child (marker, NULL); 20 [ - + ]: 2 : g_assert_null (gtk_widget_get_first_child (GTK_WIDGET (marker))); 21 : 2 : } 22 : : 23 : : int 24 : 2 : main (int argc, char *argv[]) 25 : : { 26 : 2 : g_test_init (&argc, &argv, NULL); 27 : 2 : gtk_init (); 28 : : 29 : 2 : g_test_add_func ("/marker/child", test_marker_child); 30 : : 31 : 2 : return g_test_run (); 32 : : }