New test directory and test case for DPA_Search

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changelog:
	wine/dlls/comctl32/tests, wine/dlls/comctl32/tests/dpa.c
	New test directory and test case for DPA_Search
-- 
Uwe Bonnes                bon@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: wine/configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.154
diff -u -r1.154 configure.ac
--- wine/configure.ac	1 May 2003 03:16:21 -0000	1.154
+++ wine/configure.ac	1 May 2003 22:55:17 -0000
@@ -1370,6 +1370,7 @@
 dlls/cabinet/Makefile
 dlls/comcat/Makefile
 dlls/comctl32/Makefile
+dlls/comctl32/tests/Makefile
 dlls/commdlg/Makefile
 dlls/crtdll/Makefile
 dlls/crypt32/Makefile
--- /dev/null	2003-01-04 19:59:46.000000000 +0100
+++ wine/dlls/comctl32/tests/Makefile.in	2003-05-01 16:04:16.000000000 +0200
@@ -0,0 +1,12 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+TESTDLL   = comctl32.dll
+IMPORTS   = comctl32
+
+CTESTS = \
+	dpa.c
+@MAKE_TEST_RULES@
+
+### Dependencies:
--- /dev/null	2003-01-04 19:59:46.000000000 +0100
+++ wine/dlls/comctl32/tests/dpa.c	2003-05-01 16:03:15.000000000 +0200
@@ -0,0 +1,34 @@
+#include "winbase.h"
+#include "commctrl.h"
+
+#include "wine/test.h"
+
+static INT CALLBACK dpa_strcmp(LPVOID pvstr1, LPVOID pvstr2, LPARAM flags)
+{
+  LPCSTR str1 = (LPCSTR)pvstr1;
+  LPCSTR str2 = (LPCSTR)pvstr2;
+  
+  return lstrcmpA (str1, str2);
+}
+
+void DPA_test()
+{
+  HDPA dpa_ret;
+  INT  int_ret;
+  CHAR test_str0[]="test0";
+  
+  dpa_ret = DPA_Create(0);
+  ok((dpa_ret !=0), "DPA_Create failed");
+  int_ret = DPA_Search(dpa_ret,test_str0,0, dpa_strcmp,0, DPAS_SORTED);
+  ok((int_ret == -1), "DPA_Search found invalid item");
+  int_ret = DPA_Search(dpa_ret,test_str0,0, dpa_strcmp,0, DPAS_SORTED|DPAS_INSERTBEFORE);
+  ok((int_ret == 0), "DPA_Search proposed bad item");
+  int_ret = DPA_Search(dpa_ret,test_str0,0, dpa_strcmp,0, DPAS_SORTED|DPAS_INSERTAFTER);
+  ok((int_ret == 0), "DPA_Search proposed bad item");
+}
+
+START_TEST(dpa)
+{
+    DPA_test();
+    
+}


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux