diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-03-18 19:10:23 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-03-23 08:21:54 +0100 |
commit | 41051fd3d3ac7450771518aa12b660867ed7e819 (patch) | |
tree | 59c94244c7437d95e53a3227d18214f14a542d10 /lib/util/charset/tests/charset.c | |
parent | 89fd1cb767c966d5ba60323bdb04a6baf973e4a3 (diff) | |
download | samba-41051fd3d3ac7450771518aa12b660867ed7e819.tar.gz samba-41051fd3d3ac7450771518aa12b660867ed7e819.tar.bz2 samba-41051fd3d3ac7450771518aa12b660867ed7e819.zip |
lib/util: Merge basic string length and comparison functions
These functions now use the codepoints for more accurate string
handling and now form common code.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Mar 23 08:21:54 CET 2011 on sn-devel-104
Diffstat (limited to 'lib/util/charset/tests/charset.c')
-rw-r--r-- | lib/util/charset/tests/charset.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/util/charset/tests/charset.c b/lib/util/charset/tests/charset.c index 72fd11b128..351b91c7b7 100644 --- a/lib/util/charset/tests/charset.c +++ b/lib/util/charset/tests/charset.c @@ -69,14 +69,14 @@ static bool test_strequal_m(struct torture_context *tctx) return true; } -static bool test_strcsequal_m(struct torture_context *tctx) +static bool test_strcsequal(struct torture_context *tctx) { - torture_assert(tctx, !strcsequal_m("foo", "bar"), "different strings"); - torture_assert(tctx, strcsequal_m("foo", "foo"), "same case strings"); - torture_assert(tctx, !strcsequal_m("foo", "Foo"), "different case strings"); - torture_assert(tctx, !strcsequal_m(NULL, "Foo"), "one NULL"); - torture_assert(tctx, !strcsequal_m("foo", NULL), "other NULL"); - torture_assert(tctx, strcsequal_m(NULL, NULL), "both NULL"); + torture_assert(tctx, !strcsequal("foo", "bar"), "different strings"); + torture_assert(tctx, strcsequal("foo", "foo"), "same case strings"); + torture_assert(tctx, !strcsequal("foo", "Foo"), "different case strings"); + torture_assert(tctx, !strcsequal(NULL, "Foo"), "one NULL"); + torture_assert(tctx, !strcsequal("foo", NULL), "other NULL"); + torture_assert(tctx, strcsequal(NULL, NULL), "both NULL"); return true; } @@ -253,7 +253,7 @@ struct torture_suite *torture_local_charset(TALLOC_CTX *mem_ctx) torture_suite_add_simple_test(suite, "codepoint_cmpi", test_codepoint_cmpi); torture_suite_add_simple_test(suite, "strcasecmp_m", test_strcasecmp_m); torture_suite_add_simple_test(suite, "strequal_m", test_strequal_m); - torture_suite_add_simple_test(suite, "strcsequal_m", test_strcsequal_m); + torture_suite_add_simple_test(suite, "strcsequal", test_strcsequal); torture_suite_add_simple_test(suite, "string_replace_m", test_string_replace_m); torture_suite_add_simple_test(suite, "strncasecmp_m", test_strncasecmp_m); torture_suite_add_simple_test(suite, "next_token", test_next_token); |