1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
#include <call-ui.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
static void
test_dialpad (void)
{
CuiDialpad *dialpad;
GValue val = G_VALUE_INIT;
g_test_expect_message ("Cui", G_LOG_LEVEL_WARNING, "libcallaudio not initialized");
dialpad = cui_dialpad_new ();
g_assert_true (CUI_IS_DIALPAD (dialpad));
/* test number proprietary */
g_value_init (&val, G_TYPE_STRING);
g_value_set_string (&val, "+3129877983#*3129877983");
g_object_set_property (G_OBJECT (dialpad), "number", &val);
g_value_set_string (&val, "Don't be this string!");
g_object_get_property (G_OBJECT (dialpad), "number", &val);
g_assert_cmpstr (g_value_get_string (&val), ==, "+3129877983#*3129877983");
/* Clean up */
g_value_unset (&val);
gtk_widget_destroy (GTK_WIDGET (dialpad));
}
int
main (int argc,
char *argv[])
{
int retval;
gtk_test_init (&argc, &argv, NULL);
cui_init (FALSE);
g_test_add_func ("/CallUI/dialpad", test_dialpad);
retval = g_test_run ();
cui_uninit ();
return retval;
}
|