[TWAIN_32_WINETEST]
authorAmine Khaldi <amine.khaldi@reactos.org>
Tue, 3 Dec 2013 11:27:55 +0000 (11:27 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Tue, 3 Dec 2013 11:27:55 +0000 (11:27 +0000)
* Sync with Wine 1.7.1.
CORE-7469

svn path=/trunk/; revision=61208

rostests/winetests/twain_32/CMakeLists.txt
rostests/winetests/twain_32/dsm.c
rostests/winetests/twain_32/testlist.c

index cd0b1c0..1972c46 100644 (file)
@@ -1,10 +1,5 @@
 
-add_definitions(
-    -D__ROS_LONG64__
-    -D_DLL -D__USE_CRTIMP)
-
 add_executable(twain_32_winetest dsm.c testlist.c)
-target_link_libraries(twain_32_winetest wine)
 set_module_type(twain_32_winetest win32cui)
-add_importlibs(twain_32_winetest user32 gdi32 msvcrt kernel32 ntdll)
+add_importlibs(twain_32_winetest user32 gdi32 msvcrt kernel32)
 add_cd_file(TARGET twain_32_winetest DESTINATION reactos/bin FOR all)
index f3b6f95..96381e6 100644 (file)
@@ -18,7 +18,7 @@
  *
  */
 #include <stdarg.h>
-#include <assert.h>
+
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
@@ -33,6 +33,7 @@ static DSMENTRYPROC pDSM_Entry;
 static BOOL dsm_RegisterWindowClasses(void)
 {
     WNDCLASSA cls;
+    BOOL rc;
 
     cls.style = 0;
     cls.lpfnWndProc = DefWindowProc;
@@ -44,9 +45,10 @@ static BOOL dsm_RegisterWindowClasses(void)
     cls.hbrBackground = GetStockObject(WHITE_BRUSH);
     cls.lpszMenuName = NULL;
     cls.lpszClassName = "TWAIN_dsm_class";
-    if (!RegisterClassA(&cls)) return FALSE;
 
-    return TRUE;
+    rc = RegisterClassA(&cls);
+    ok(rc, "RegisterClassA failed: le=%u\n", GetLastError());
+    return rc;
 }
 
 
@@ -832,7 +834,11 @@ START_TEST(dsm)
     HANDLE hwnd;
     HMODULE htwain;
 
-    if (!dsm_RegisterWindowClasses()) assert(0);
+    if (!dsm_RegisterWindowClasses())
+    {
+        skip("Could not register the test class, skipping tests\n");
+        return;
+    }
 
     htwain = LoadLibraryA("twain_32.dll");
     if (! htwain)
index 94d282a..a6c6b1f 100644 (file)
@@ -1,8 +1,5 @@
 /* Automatically generated file; DO NOT EDIT!! */
 
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
 #define STANDALONE
 #include "wine/test.h"