msvcrt: heap tests cleanup

Dimitrie O. Paun dpaun at rogers.com
Tue Mar 9 23:09:31 CST 2004


ChangeLog
    Heap tests cleanup.

Index: dlls/msvcrt/tests/heap.c
===================================================================
RCS file: /var/cvs/wine/dlls/msvcrt/tests/heap.c,v
retrieving revision 1.2
diff -u -r1.2 heap.c
--- dlls/msvcrt/tests/heap.c	27 Jan 2004 04:01:10 -0000	1.2
+++ dlls/msvcrt/tests/heap.c	27 Jan 2004 20:52:42 -0000
@@ -18,14 +18,17 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include "wine/test.h"
 #include <stdlib.h>
+#include "wine/test.h"
 
-static void test_realloc( void )
+START_TEST(heap)
 {
-    void *mem = NULL;
+    void *mem;
+
+    mem = malloc(0);
+    ok(mem != NULL, "memory not allocated for size 0\n");
 
-    mem = realloc(mem, 10);
+    mem = realloc(NULL, 10);
     ok(mem != NULL, "memory not allocated\n");
     
     mem = realloc(mem, 20);
@@ -33,9 +36,7 @@
  
     mem = realloc(mem, 0);
     ok(mem == NULL, "memory not freed\n");
-}
-
-START_TEST(heap)
-{
-    test_realloc();
+    
+    mem = realloc(NULL, 0);
+    ok(mem != NULL, "memory not (re)allocated for size 0\n");
 }


-- 
Dimi.




More information about the wine-patches mailing list