mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-04 20:07:36 +00:00
tests: ui-call: Prefer type specific assertions
This will make it easier to see what's going wrong when an assertion fails.
This commit is contained in:
parent
b530db9775
commit
35953ff4d1
1 changed files with 7 additions and 7 deletions
|
@ -57,9 +57,9 @@ test_cui_call_properties (void)
|
|||
cui_call = CUI_CALL (ui_call);
|
||||
|
||||
g_assert_cmpstr (calls_ui_call_data_get_origin_id (ui_call), ==, "test-id");
|
||||
g_assert_true (calls_call_get_id (call) == cui_call_get_id (cui_call));
|
||||
g_assert_true (calls_call_get_name (call) == cui_call_get_display_name (cui_call));
|
||||
g_assert_true (calls_call_state_to_cui_call_state (calls_call_get_state (call)) ==
|
||||
g_assert_cmpstr (calls_call_get_id (call), ==, cui_call_get_id (cui_call));
|
||||
g_assert_cmpstr (calls_call_get_name (call), ==, cui_call_get_display_name (cui_call));
|
||||
g_assert_cmpint (calls_call_state_to_cui_call_state (calls_call_get_state (call)), ==,
|
||||
cui_call_get_state (cui_call));
|
||||
|
||||
g_object_get (cui_call, "inbound", &inbound, NULL);
|
||||
|
@ -67,19 +67,19 @@ test_cui_call_properties (void)
|
|||
|
||||
/* Test if properties get updated */
|
||||
calls_call_answer (call);
|
||||
g_assert_true (calls_call_state_to_cui_call_state (calls_call_get_state (call)) ==
|
||||
g_assert_cmpint (calls_call_state_to_cui_call_state (calls_call_get_state (call)), ==,
|
||||
cui_call_get_state (cui_call));
|
||||
|
||||
calls_call_hang_up (call);
|
||||
g_assert_true (calls_call_state_to_cui_call_state (calls_call_get_state (call)) ==
|
||||
g_assert_cmpint (calls_call_state_to_cui_call_state (calls_call_get_state (call)), ==,
|
||||
cui_call_get_state (cui_call));
|
||||
|
||||
calls_call_set_id (call, "0123456789");
|
||||
g_assert_true (calls_call_get_id (call) == cui_call_get_id (cui_call));
|
||||
g_assert_cmpstr (calls_call_get_id (call), ==, cui_call_get_id (cui_call));
|
||||
g_assert_cmpstr (cui_call_get_id (cui_call), ==, "0123456789");
|
||||
|
||||
calls_call_set_name (call, "Jane Doe");
|
||||
g_assert_true (calls_call_get_name (call) == cui_call_get_display_name (cui_call));
|
||||
g_assert_cmpstr (calls_call_get_name (call), ==, cui_call_get_display_name (cui_call));
|
||||
g_assert_cmpstr (cui_call_get_display_name (cui_call), ==, "Jane Doe");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue