Andrew Nguyen : ntdll/tests: Add a few additional tests for wcschr.
Alexandre Julliard
julliard at winehq.org
Thu Jan 14 11:33:36 CST 2010
Module: wine
Branch: master
Commit: dca1bd86337c078d39d9bb7e7bca0b450da7c4fd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=dca1bd86337c078d39d9bb7e7bca0b450da7c4fd
Author: Andrew Nguyen <arethusa26 at gmail.com>
Date: Wed Jan 13 06:45:02 2010 -0600
ntdll/tests: Add a few additional tests for wcschr.
---
dlls/ntdll/tests/string.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/tests/string.c b/dlls/ntdll/tests/string.c
index 16c1192..f9b8665 100644
--- a/dlls/ntdll/tests/string.c
+++ b/dlls/ntdll/tests/string.c
@@ -1113,10 +1113,21 @@ static void test_wtoi64(void)
}
}
-static void test_wcsfuncs(void)
+static void test_wcschr(void)
+{
+ static const WCHAR teststringW[] = {'a','b','r','a','c','a','d','a','b','r','a',0};
+
+ ok(p_wcschr(teststringW, 'a') == teststringW + 0,
+ "wcschr should have returned a pointer to the first 'a' character\n");
+ ok(p_wcschr(teststringW, 0) == teststringW + 11,
+ "wcschr should have returned a pointer to the null terminator\n");
+ ok(p_wcschr(teststringW, 'x') == NULL,
+ "wcschr should have returned NULL\n");
+}
+
+static void test_wcsrchr(void)
{
static const WCHAR testing[] = {'T','e','s','t','i','n','g',0};
- ok (p_wcschr(testing,0)!=NULL, "wcschr Not finding terminating character\n");
ok (p_wcsrchr(testing,0)!=NULL, "wcsrchr Not finding terminating character\n");
}
@@ -1140,8 +1151,10 @@ START_TEST(string)
test_wtol();
if (p_wtoi64)
test_wtoi64();
- if (p_wcschr && p_wcsrchr)
- test_wcsfuncs();
+ if (p_wcschr)
+ test_wcschr();
+ if (p_wcsrchr)
+ test_wcsrchr();
if (patoi)
test_atoi();
if (patol)
More information about the wine-cvs
mailing list