Andrew Nguyen : ntdll/tests: Add a few additional tests for wcsrchr.

Alexandre Julliard julliard at winehq.org
Thu Jan 14 11:33:36 CST 2010


Module: wine
Branch: master
Commit: d7557a192672c0e00dd368f686bfe51a91ea8f1d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d7557a192672c0e00dd368f686bfe51a91ea8f1d

Author: Andrew Nguyen <arethusa26 at gmail.com>
Date:   Wed Jan 13 06:45:22 2010 -0600

ntdll/tests: Add a few additional tests for wcsrchr.

---

 dlls/ntdll/tests/string.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/dlls/ntdll/tests/string.c b/dlls/ntdll/tests/string.c
index f9b8665..cd3ae37 100644
--- a/dlls/ntdll/tests/string.c
+++ b/dlls/ntdll/tests/string.c
@@ -1126,9 +1126,15 @@ static void test_wcschr(void)
 }
 
 static void test_wcsrchr(void)
-{       
-    static const WCHAR testing[] = {'T','e','s','t','i','n','g',0};
-    ok (p_wcsrchr(testing,0)!=NULL, "wcsrchr Not finding terminating character\n");
+{
+    static const WCHAR teststringW[] = {'a','b','r','a','c','a','d','a','b','r','a',0};
+
+    ok(p_wcsrchr(teststringW, 'a') == teststringW + 10,
+       "wcsrchr should have returned a pointer to the last 'a' character\n");
+    ok(p_wcsrchr(teststringW, 0) == teststringW + 11,
+       "wcsrchr should have returned a pointer to the null terminator\n");
+    ok(p_wcsrchr(teststringW, 'x') == NULL,
+       "wcsrchr should have returned NULL\n");
 }
 
 START_TEST(string)




More information about the wine-cvs mailing list