summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2007-12-24 13:04:56 -0600
committerStefan Metzmacher <metze@samba.org>2007-12-26 11:57:05 -0600
commit3c744ddd2c33a9a06013f357261b8ea86804e8e8 (patch)
tree431d069898a963280398c88b94f56498ac678aa8 /source4/lib
parent95b1f554b2c57a9f975a0cc27ca51bec6c7594d6 (diff)
downloadsamba-3c744ddd2c33a9a06013f357261b8ea86804e8e8.tar.gz
samba-3c744ddd2c33a9a06013f357261b8ea86804e8e8.tar.bz2
samba-3c744ddd2c33a9a06013f357261b8ea86804e8e8.zip
r26588: Janitorial: Rename torture_*_add_*test to torture_*_add_*test_const.
Also rename the corresponding wrap_ functions. (This used to be commit e59c2eaf681f076d175b9779d1c27b5f74a57c96)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/events/testsuite.c2
-rw-r--r--source4/lib/messaging/tests/irpc.c9
-rw-r--r--source4/lib/registry/tests/hive.c40
-rw-r--r--source4/lib/registry/tests/registry.c73
-rw-r--r--source4/lib/util/tests/strlist.c5
5 files changed, 65 insertions, 64 deletions
diff --git a/source4/lib/events/testsuite.c b/source4/lib/events/testsuite.c
index 46acf5938e..7f2729ceff 100644
--- a/source4/lib/events/testsuite.c
+++ b/source4/lib/events/testsuite.c
@@ -136,7 +136,7 @@ struct torture_suite *torture_local_event(TALLOC_CTX *mem_ctx)
int i;
for (i=0;list && list[i];i++) {
- torture_suite_add_simple_tcase(suite, list[i],
+ torture_suite_add_simple_tcase_const(suite, list[i],
test_event_context,
(const void *)list[i]);
}
diff --git a/source4/lib/messaging/tests/irpc.c b/source4/lib/messaging/tests/irpc.c
index ce3d1045e5..a2995fc983 100644
--- a/source4/lib/messaging/tests/irpc.c
+++ b/source4/lib/messaging/tests/irpc.c
@@ -260,11 +260,12 @@ struct torture_suite *torture_local_irpc(TALLOC_CTX *mem_ctx)
tcase->setup = irpc_setup;
for (i = 0; i < 5; i++) {
- torture_tcase_add_test(tcase, "addone", test_addone, (void *)values[i]);
+ torture_tcase_add_test_const(tcase, "addone", test_addone,
+ (void *)values[i]);
}
-
- torture_tcase_add_test(tcase, "echodata", test_echodata, NULL);
- torture_tcase_add_test(tcase, "speed", test_speed, NULL);
+
+ torture_tcase_add_test_const(tcase, "echodata", test_echodata, NULL);
+ torture_tcase_add_test_const(tcase, "speed", test_speed, NULL);
return suite;
}
diff --git a/source4/lib/registry/tests/hive.c b/source4/lib/registry/tests/hive.c
index 43ec9e4252..dc59d0f9ca 100644
--- a/source4/lib/registry/tests/hive.c
+++ b/source4/lib/registry/tests/hive.c
@@ -264,26 +264,26 @@ static bool test_list_values(struct torture_context *tctx,
static void tcase_add_tests(struct torture_tcase *tcase)
{
- torture_tcase_add_simple_test(tcase, "del_nonexistant_key",
- test_del_nonexistant_key);
- torture_tcase_add_simple_test(tcase, "add_subkey",
- test_add_subkey);
- torture_tcase_add_simple_test(tcase, "flush_key",
- test_flush_key);
- torture_tcase_add_simple_test(tcase, "get_info",
- test_keyinfo_root);
- torture_tcase_add_simple_test(tcase, "get_info_nums",
- test_keyinfo_nums);
- torture_tcase_add_simple_test(tcase, "set_value",
- test_set_value);
- torture_tcase_add_simple_test(tcase, "get_value",
- test_get_value);
- torture_tcase_add_simple_test(tcase, "list_values",
- test_list_values);
- torture_tcase_add_simple_test(tcase, "del_key",
- test_del_key);
- torture_tcase_add_simple_test(tcase, "del_value",
- test_del_value);
+ torture_tcase_add_simple_test_const(tcase, "del_nonexistant_key",
+ test_del_nonexistant_key);
+ torture_tcase_add_simple_test_const(tcase, "add_subkey",
+ test_add_subkey);
+ torture_tcase_add_simple_test_const(tcase, "flush_key",
+ test_flush_key);
+ torture_tcase_add_simple_test_const(tcase, "get_info",
+ test_keyinfo_root);
+ torture_tcase_add_simple_test_const(tcase, "get_info_nums",
+ test_keyinfo_nums);
+ torture_tcase_add_simple_test_const(tcase, "set_value",
+ test_set_value);
+ torture_tcase_add_simple_test_const(tcase, "get_value",
+ test_get_value);
+ torture_tcase_add_simple_test_const(tcase, "list_values",
+ test_list_values);
+ torture_tcase_add_simple_test_const(tcase, "del_key",
+ test_del_key);
+ torture_tcase_add_simple_test_const(tcase, "del_value",
+ test_del_value);
}
static bool hive_setup_dir(struct torture_context *tctx, void **data)
diff --git a/source4/lib/registry/tests/registry.c b/source4/lib/registry/tests/registry.c
index 6c520f54ed..7897909865 100644
--- a/source4/lib/registry/tests/registry.c
+++ b/source4/lib/registry/tests/registry.c
@@ -560,42 +560,43 @@ static bool setup_local_registry(struct torture_context *tctx, void **data)
static void tcase_add_tests(struct torture_tcase *tcase)
{
- torture_tcase_add_simple_test(tcase, "list_subkeys",
- test_list_subkeys);
- torture_tcase_add_simple_test(tcase, "get_predefined_key",
- test_get_predefined);
- torture_tcase_add_simple_test(tcase, "get_predefined_key",
- test_get_predefined_unknown);
- torture_tcase_add_simple_test(tcase, "create_key",
- test_create_subkey);
- torture_tcase_add_simple_test(tcase, "create_key",
- test_create_nested_subkey);
- torture_tcase_add_simple_test(tcase, "key_add_abs",
- test_key_add_abs);
- torture_tcase_add_simple_test(tcase, "key_add_abs_top",
- test_key_add_abs_top);
- torture_tcase_add_simple_test(tcase, "set_value",
- test_set_value);
- torture_tcase_add_simple_test(tcase, "get_value",
- test_get_value);
- torture_tcase_add_simple_test(tcase, "list_values",
- test_list_values);
- torture_tcase_add_simple_test(tcase, "del_key",
- test_del_key);
- torture_tcase_add_simple_test(tcase, "del_value",
- test_del_value);
- torture_tcase_add_simple_test(tcase, "flush_key",
- test_flush_key);
- torture_tcase_add_simple_test(tcase, "query_key",
- test_query_key);
- torture_tcase_add_simple_test(tcase, "query_key_nums",
- test_query_key_nums);
- torture_tcase_add_simple_test(tcase, "test_predef_key_by_name",
- test_predef_key_by_name);
- torture_tcase_add_simple_test(tcase, "security",
- test_security);
- torture_tcase_add_simple_test(tcase, "test_predef_key_by_name_invalid",
- test_predef_key_by_name_invalid);
+ torture_tcase_add_simple_test_const(tcase, "list_subkeys",
+ test_list_subkeys);
+ torture_tcase_add_simple_test_const(tcase, "get_predefined_key",
+ test_get_predefined);
+ torture_tcase_add_simple_test_const(tcase, "get_predefined_key",
+ test_get_predefined_unknown);
+ torture_tcase_add_simple_test_const(tcase, "create_key",
+ test_create_subkey);
+ torture_tcase_add_simple_test_const(tcase, "create_key",
+ test_create_nested_subkey);
+ torture_tcase_add_simple_test_const(tcase, "key_add_abs",
+ test_key_add_abs);
+ torture_tcase_add_simple_test_const(tcase, "key_add_abs_top",
+ test_key_add_abs_top);
+ torture_tcase_add_simple_test_const(tcase, "set_value",
+ test_set_value);
+ torture_tcase_add_simple_test_const(tcase, "get_value",
+ test_get_value);
+ torture_tcase_add_simple_test_const(tcase, "list_values",
+ test_list_values);
+ torture_tcase_add_simple_test_const(tcase, "del_key",
+ test_del_key);
+ torture_tcase_add_simple_test_const(tcase, "del_value",
+ test_del_value);
+ torture_tcase_add_simple_test_const(tcase, "flush_key",
+ test_flush_key);
+ torture_tcase_add_simple_test_const(tcase, "query_key",
+ test_query_key);
+ torture_tcase_add_simple_test_const(tcase, "query_key_nums",
+ test_query_key_nums);
+ torture_tcase_add_simple_test_const(tcase, "test_predef_key_by_name",
+ test_predef_key_by_name);
+ torture_tcase_add_simple_test_const(tcase, "security",
+ test_security);
+ torture_tcase_add_simple_test_const(tcase,
+ "test_predef_key_by_name_invalid",
+ test_predef_key_by_name_invalid);
}
struct torture_suite *torture_registry_registry(TALLOC_CTX *mem_ctx)
diff --git a/source4/lib/util/tests/strlist.c b/source4/lib/util/tests/strlist.c
index 3ecb982e24..9af26f9e71 100644
--- a/source4/lib/util/tests/strlist.c
+++ b/source4/lib/util/tests/strlist.c
@@ -93,9 +93,8 @@ struct torture_suite *torture_local_util_strlist(TALLOC_CTX *mem_ctx)
int i;
for (i = 0; test_lists_shell_strings[i]; i++) {
- torture_suite_add_simple_tcase(suite,
- "lists_shell", test_lists_shell,
- &test_lists_shell_strings[i]);
+ torture_suite_add_simple_tcase_const(suite, "lists_shell",
+ test_lists_shell, &test_lists_shell_strings[i]);
}
torture_suite_add_simple_test(suite, "list_copy", test_list_copy);