summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPadraig O'Briain <padraigo@src.gnome.org>2001-12-03 09:07:05 +0000
committerPadraig O'Briain <padraigo@src.gnome.org>2001-12-03 09:07:05 +0000
commite689f7a2522ed2b860a6978af71bca34f1a55870 (patch)
treef4f9f2c1f2fa8ca4e13c5b305f8c33396fda52ce /tests
parent5f25232536fe7874414d8d620ffdc07962503b35 (diff)
downloadatk-e689f7a2522ed2b860a6978af71bca34f1a55870.tar.gz
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 (_)
Diffstat (limited to 'tests')
-rw-r--r--tests/testrelation.c22
-rw-r--r--tests/teststateset.c14
2 files changed, 18 insertions, 18 deletions
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;
}
/*