From e689f7a2522ed2b860a6978af71bca34f1a55870 Mon Sep 17 00:00:00 2001 From: Padraig O'Briain Date: Mon, 3 Dec 2001 09:07:05 +0000 Subject: Use ATK_TYPE_RELATION_TYPE in atk_relation_type_get_name() and * atk/atkrelation.c: Use ATK_TYPE_RELATION_TYPE in atk_relation_type_get_name() and atk_relation_type_for_name() * atk/atkstate.c: Use ATK_TYPE_STATE_TYPE in atk_state_type_get_name() and atk_state_type_for_name() * tests/testrelation.c, tests/teststateset.c: Update tests as name componenets are separated by hyphen (-) rather than underline (_) --- tests/testrelation.c | 22 +++++++++++----------- tests/teststateset.c | 14 +++++++------- 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'tests') diff --git a/tests/testrelation.c b/tests/testrelation.c index 9ffaec2..26907fa 100644 --- a/tests/testrelation.c +++ b/tests/testrelation.c @@ -31,7 +31,7 @@ test_relation (void) name = atk_relation_type_get_name (ATK_RELATION_LABEL_FOR); g_return_val_if_fail (name, FALSE); - if (strcmp (name, "label_for") != 0) + if (strcmp (name, "label-for") != 0) { g_print ("Unexpected name for ATK_RELATION_LABEL_FOR %s\n", name); return FALSE; @@ -39,37 +39,37 @@ test_relation (void) name = atk_relation_type_get_name (ATK_RELATION_NODE_CHILD_OF); g_return_val_if_fail (name, FALSE); - if (strcmp (name, "node_child_of") != 0) + if (strcmp (name, "node-child-of") != 0) { g_print ("Unexpected name for ATK_STATE_MODAL %s\n", name); return FALSE; } - type1 = atk_relation_type_for_name ("controlled_by"); + type1 = atk_relation_type_for_name ("controlled-by"); if (type1 != ATK_RELATION_CONTROLLED_BY) { g_print ("Unexpected type for focused\n"); return FALSE; } - type1 = atk_relation_type_register ("test_state"); + type1 = atk_relation_type_register ("test-state"); name = atk_relation_type_get_name (type1); g_return_val_if_fail (name, FALSE); - if (strcmp (name, "test_state") != 0) + if (strcmp (name, "test-state") != 0) { - g_print ("Unexpected name for test_state %s\n", name); + g_print ("Unexpected name for test-state %s\n", name); return FALSE; } - type2 = atk_relation_type_for_name ("test_state"); + type2 = atk_relation_type_for_name ("test-state"); if (type1 != type2) { - g_print ("Unexpected type for test_state\n"); + g_print ("Unexpected type for test-state\n"); return FALSE; } - type2 = atk_relation_type_for_name ("TEST-STATE"); + type2 = atk_relation_type_for_name ("TEST_STATE"); if (type2 != 0) { - g_print ("Unexpected type for TEST-STATE\n"); + g_print ("Unexpected type for TEST_STATE\n"); return FALSE; } /* @@ -78,7 +78,7 @@ test_relation (void) name = atk_relation_type_get_name (ATK_RELATION_LAST_DEFINED + 2); if (name) { - g_print ("Unexpected name for undefined type\n"); + g_print ("Unexpected name for undefined type %s\n", name); return FALSE; } return TRUE; diff --git a/tests/teststateset.c b/tests/teststateset.c index 05718b7..b9cb8ce 100644 --- a/tests/teststateset.c +++ b/tests/teststateset.c @@ -233,25 +233,25 @@ test_state (void) return FALSE; } - type1 = atk_state_type_register ("test_state"); + type1 = atk_state_type_register ("test-state"); name = atk_state_type_get_name (type1); g_return_val_if_fail (name, FALSE); - if (strcmp (name, "test_state") != 0) + if (strcmp (name, "test-state") != 0) { - g_print ("Unexpected name for test_state %s\n", name); + g_print ("Unexpected name for test-state %s\n", name); return FALSE; } - type2 = atk_state_type_for_name ("test_state"); + type2 = atk_state_type_for_name ("test-state"); g_return_val_if_fail (name, FALSE); if (type1 != type2) { - g_print ("Unexpected type for test_state\n"); + g_print ("Unexpected type for test-state %d %d\n", type1, type2); return FALSE; } - type2 = atk_state_type_for_name ("TEST-STATE"); + type2 = atk_state_type_for_name ("TEST_STATE"); if (type2 != 0) { - g_print ("Unexpected type for TEST-STATE\n"); + g_print ("Unexpected type for TEST_STATE\n"); return FALSE; } /* -- cgit v1.2.1