[ROSTESTS:APITESTS]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 22 Sep 2013 17:52:42 +0000 (17:52 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 22 Sep 2013 17:52:42 +0000 (17:52 +0000)
Introduce a "apitest.h" header gathering special things for apitests (SEH macros, wine/test.h inclusion, and so on...).

svn path=/trunk/; revision=60313

91 files changed:
rostests/apitests/CMakeLists.txt
rostests/apitests/advapi32/CreateService.c
rostests/apitests/advapi32/LockDatabase.c
rostests/apitests/advapi32/QueryServiceConfig2.c
rostests/apitests/advapi32/SaferIdentifyLevel.c
rostests/apitests/advapi32/testlist.c
rostests/apitests/browseui/SHExplorerParseCmdLine.c
rostests/apitests/browseui/testlist.c
rostests/apitests/com/testlist.c
rostests/apitests/crt/_vscprintf.c
rostests/apitests/crt/_vscwprintf.c
rostests/apitests/crt/_vsnprintf.c
rostests/apitests/crt/_vsnwprintf.c
rostests/apitests/crt/mbstowcs_s.c
rostests/apitests/crt/sprintf.c
rostests/apitests/crt/strcpy.c
rostests/apitests/crt/testlist.c
rostests/apitests/crt/wcstombs_s.c
rostests/apitests/dciman32/DCICreatePrimary.c
rostests/apitests/dciman32/testlist.c
rostests/apitests/gdi32/AddFontResource.c
rostests/apitests/gdi32/AddFontResourceEx.c
rostests/apitests/gdi32/BeginPath.c
rostests/apitests/gdi32/CombineRgn.c
rostests/apitests/gdi32/CombineTransform.c
rostests/apitests/gdi32/CreateBitmap.c
rostests/apitests/gdi32/CreateBitmapIndirect.c
rostests/apitests/gdi32/CreateCompatibleDC.c
rostests/apitests/gdi32/CreateDIBPatternBrush.c
rostests/apitests/gdi32/CreateDIBitmap.c
rostests/apitests/gdi32/CreateFont.c
rostests/apitests/gdi32/CreateFontIndirect.c
rostests/apitests/gdi32/CreateIconIndirect.c
rostests/apitests/gdi32/CreatePen.c
rostests/apitests/gdi32/CreateRectRgn.c
rostests/apitests/gdi32/DPtoLP.c
rostests/apitests/gdi32/EngAcquireSemaphore.c
rostests/apitests/gdi32/EngCreateSemaphore.c
rostests/apitests/gdi32/EngDeleteSemaphore.c
rostests/apitests/gdi32/EngReleaseSemaphore.c
rostests/apitests/gdi32/ExtCreatePen.c
rostests/apitests/gdi32/GdiConvertBitmap.c
rostests/apitests/gdi32/GdiConvertBrush.c
rostests/apitests/gdi32/GdiConvertDC.c
rostests/apitests/gdi32/GdiConvertFont.c
rostests/apitests/gdi32/GdiConvertPalette.c
rostests/apitests/gdi32/GdiConvertRegion.c
rostests/apitests/gdi32/GdiDeleteLocalDC.c
rostests/apitests/gdi32/GdiGetCharDimensions.c
rostests/apitests/gdi32/GdiGetLocalBrush.c
rostests/apitests/gdi32/GdiGetLocalDC.c
rostests/apitests/gdi32/GdiReleaseLocalDC.c
rostests/apitests/gdi32/GdiSetAttrs.c
rostests/apitests/gdi32/GetClipRgn.c
rostests/apitests/gdi32/GetCurrentObject.c
rostests/apitests/gdi32/GetDIBColorTable.c
rostests/apitests/gdi32/GetDIBits.c
rostests/apitests/gdi32/GetObject.c
rostests/apitests/gdi32/GetPixel.c
rostests/apitests/gdi32/GetRandomRgn.c
rostests/apitests/gdi32/GetStockObject.c
rostests/apitests/gdi32/GetTextExtentExPoint.c
rostests/apitests/gdi32/GetTextFace.c
rostests/apitests/gdi32/MaskBlt.c
rostests/apitests/gdi32/PatBlt.c
rostests/apitests/gdi32/Rectangle.c
rostests/apitests/gdi32/SelectObject.c
rostests/apitests/gdi32/SetBrushOrgEx.c
rostests/apitests/gdi32/SetDCPenColor.c
rostests/apitests/gdi32/SetDIBits.c
rostests/apitests/gdi32/SetDIBitsToDevice.c
rostests/apitests/gdi32/SetMapMode.c
rostests/apitests/gdi32/SetPixel.c
rostests/apitests/gdi32/SetSysColors.c
rostests/apitests/gdi32/SetWindowExtEx.c
rostests/apitests/gdi32/SetWorldTransform.c
rostests/apitests/gdi32/testlist.c
rostests/apitests/include/apitest.h [new file with mode: 0644]
rostests/apitests/kernel32/FindFiles.c
rostests/apitests/kernel32/GetCurrentDirectory.c
rostests/apitests/kernel32/GetDriveType.c
rostests/apitests/kernel32/GetModuleFileName.c
rostests/apitests/kernel32/MultiByteToWideChar.c
rostests/apitests/kernel32/SetCurrentDirectory.c
rostests/apitests/kernel32/SetUnhandledExceptionFilter.c
rostests/apitests/kernel32/lstrcpynW.c
rostests/apitests/kernel32/testlist.c
rostests/apitests/msvcrt/CommandLine.c
rostests/apitests/msvcrt/ieee.c
rostests/apitests/msvcrt/splitpath.c
rostests/apitests/msvcrt/testlist.c

index a28fa47..b7d7a29 100644 (file)
@@ -1,3 +1,5 @@
+include_directories(
+    include)
 
 add_library(apitest apitest.c)
 
index eef0df8..0c9022b 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMER:      Thomas Faber
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <winreg.h>
 #include <winsvc.h>
 #include <strsafe.h>
index 3933c36..ddc3fcd 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMER:      Hermès BÉLUSCA - MAÏTO
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <winsvc.h>
 #include <strsafe.h>
 
index d5c920c..133b9a2 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMER:      Hermès BÉLUSCA - MAÏTO
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <winreg.h>
 #include <winsvc.h>
 #include <strsafe.h>
index c0aba38..c6ed54f 100644 (file)
@@ -5,17 +5,13 @@
  * PROGRAMMER:      Thomas Faber <thfabba@gmx.de>
  */
 
+#include <apitest.h>
+
 #define WIN32_NO_STATUS
-#include <wine/test.h>
 #include <windows.h>
 #include <ndk/ntndk.h>
 #include <winsafer.h>
 
-#define StartSeh()              ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY {
-#define EndSeh(ExpectedStatus)  } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok(ExceptionStatus == ExpectedStatus, "Exception %lx, expected %lx\n", ExceptionStatus, ExpectedStatus)
-
-#define InvalidPointer ((PVOID)0x5555555555555555ULL)
-
 #define SaferIdentifyLevel(c, p, h, r) SaferIdentifyLevel(c, (PSAFER_CODE_PROPERTIES)(p), h, r)
 
 START_TEST(SaferIdentifyLevel)
index d5debe9..2d86976 100644 (file)
@@ -1,7 +1,7 @@
 #define __ROS_LONG64__
 
 #define STANDALONE
-#include <wine/test.h>
+#include <apitest.h>
 
 extern void func_CreateService(void);
 extern void func_LockDatabase(void);
index 59fb9bb..ef300a5 100644 (file)
@@ -5,8 +5,9 @@
  * PROGRAMMER:      Thomas Faber
  */
 
-#define UNICODE
-#include <wine/test.h>
+#include <apitest.h>
+
+//#define UNICODE
 #include <strsafe.h>
 #include <shlobj.h>
 
@@ -128,8 +129,8 @@ START_TEST(SHExplorerParseCmdLine)
     WCHAR OriginalCommandLine[1024];
     int i;
 
-    CommandLine = GetCommandLine();
-    (VOID)StringCbCopy(OriginalCommandLine, sizeof(OriginalCommandLine), CommandLine);
+    CommandLine = GetCommandLineW();
+    StringCbCopyW(OriginalCommandLine, sizeof(OriginalCommandLine), CommandLine);
 
     for (i = 0; i < TestCount; i++)
     {
index 6a47ca4..9ab96c7 100644 (file)
@@ -1,9 +1,7 @@
-#define WIN32_LEAN_AND_MEAN
 #define __ROS_LONG64__
-#include <windows.h>
 
 #define STANDALONE
-#include "wine/test.h"
+#include <apitest.h>
 
 extern void func_SHExplorerParseCmdLine(void);
 
index 941a991..100d2a9 100644 (file)
@@ -1,9 +1,7 @@
-#define WIN32_LEAN_AND_MEAN
 #define __ROS_LONG64__
-#include <windows.h>
 
 #define STANDALONE
-#include "wine/test.h"
+#include <apitest.h>
 
 extern void func_browseui(void);
 extern void func_ieframe(void);
index 7396995..cc8481e 100644 (file)
@@ -4,8 +4,9 @@
  * PURPOSE:         Test for _vscprintf
  */
 
+#include <apitest.h>
+
 #include <stdio.h>
-#include <wine/test.h>
 #include <tchar.h>
 #include <errno.h>
 
index 308cf62..0195f7c 100644 (file)
@@ -4,8 +4,9 @@
  * PURPOSE:         Test for _vscprintf
  */
 
+#include <apitest.h>
+
 #include <stdio.h>
-#include <wine/test.h>
 #include <tchar.h>
 #include <errno.h>
 
index e7657c3..5b60758 100644 (file)
@@ -4,17 +4,15 @@
  * PURPOSE:         Test for _vsnprintf
  */
 
+#include <apitest.h>
+
 #define WIN32_NO_STATUS
 #include <stdio.h>
-#include <wine/test.h>
 #include <tchar.h>
 #include <pseh/pseh2.h>
 #include <ndk/mmfuncs.h>
 #include <ndk/rtlfuncs.h>
 
-#define StartSeh()              ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY {
-#define EndSeh(ExpectedStatus)  } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok(ExceptionStatus == ExpectedStatus, "Exception %lx, expected %lx\n", ExceptionStatus, ExpectedStatus)
-
 static void call_varargs(char* buf, size_t buf_size, int expected_ret, LPCSTR formatString, ...)
 {
     va_list args;
index e37616c..58fb97b 100644 (file)
@@ -4,17 +4,15 @@
  * PURPOSE:         Test for _vsnprintf
  */
 
+#include <apitest.h>
+
 #define WIN32_NO_STATUS
 #include <stdio.h>
-#include <wine/test.h>
 #include <tchar.h>
 #include <pseh/pseh2.h>
 #include <ndk/mmfuncs.h>
 #include <ndk/rtlfuncs.h>
 
-#define StartSeh()              ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY {
-#define EndSeh(ExpectedStatus)  } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok(ExceptionStatus == ExpectedStatus, "Exception %lx, expected %lx\n", ExceptionStatus, ExpectedStatus)
-
 static void call_varargs(wchar_t* buf, size_t buf_size, int expected_ret, LPCWSTR formatString, ...)
 {
     va_list args;
index e78ac10..3976fd6 100644 (file)
@@ -4,10 +4,11 @@
  * PURPOSE:         Test for mbstowcs_s
  */
 
+#include <apitest.h>
+
 #define WIN32_NO_STATUS
 #include <stdio.h>
 #include <stdlib.h>
-#include <wine/test.h>
 #include <specstrings.h>
 
 #define ok_errno(x) ok_hex(errno, (x))
index 27658f2..b0f2215 100644 (file)
@@ -5,9 +5,10 @@
  * PROGRAMMER:      Thomas Faber <thfabba@gmx.de>
  */
 
+#include <apitest.h>
+
 #define WIN32_NO_STATUS
 #include <stdio.h>
-#include <wine/test.h>
 #include <tchar.h>
 #include <pseh/pseh2.h>
 #include <ndk/mmfuncs.h>
@@ -19,9 +20,6 @@
 #pragma GCC diagnostic ignored "-Wnonnull"
 #endif
 
-#define StartSeh()              ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY {
-#define EndSeh(ExpectedStatus)  } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok(ExceptionStatus == ExpectedStatus, "Exception %lx, expected %lx\n", ExceptionStatus, ExpectedStatus)
-
 static
 PVOID
 AllocateGuarded(
index a44623f..a246a19 100644 (file)
@@ -1,6 +1,7 @@
 
+#include <apitest.h>
+
 #include <stdio.h>
-#include <wine/test.h>
 
 START_TEST(strcpy)
 {
index 557a19c..1253292 100644 (file)
@@ -1,7 +1,7 @@
 #define __ROS_LONG64__
 
 #define STANDALONE
-#include <wine/test.h>
+#include <apitest.h>
 
 #if defined(TEST_MSVCRT)
 extern void func_mbstowcs_s(void);
index 1710561..324de44 100644 (file)
@@ -4,10 +4,11 @@
  * PURPOSE:         Test for wcstombs_s
  */
 
+#include <apitest.h>
+
 #define WIN32_NO_STATUS
 #include <stdio.h>
 #include <stdlib.h>
-#include <wine/test.h>
 #include <specstrings.h>
 
 #define ok_errno(x) ok_hex(errno, (x))
index e368f59..afd2717 100644 (file)
@@ -5,7 +5,7 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
 
 void Test_DCICreatePrimary()
 {
index c1d8a80..76d74d2 100644 (file)
@@ -1,7 +1,7 @@
 #define __ROS_LONG64__
 
 #define STANDALONE
-#include <wine/test.h>
+#include <apitest.h>
 
 extern void func_DCICreatePrimary(void);
 
index 4346030..6a67699 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <stdio.h>
+#include <apitest.h>
+
 #include <wine/test.h>
 #include <wingdi.h>
 
index c6b5254..56d0344 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <libs/pseh/pseh2.h>
 
index 1458d1b..db4761d 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 void Test_BeginPath()
index 209f720..7be5bf7 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 void Test_CombineRgn_Params()
index 7085b5e..679d34c 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winddi.h>
 
index e4da9ee..78a9071 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 #define DEFAULT_BITMAP 21
index 25d81c3..fb448d9 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Magnus Olsen
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 void Test_CreateBitmapIndirect()
index e4cb51b..3d7c7dc 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winuser.h>
 
index 36578e4..ea25955 100644 (file)
@@ -5,12 +5,11 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
-#include <wingdi.h>
+#include <apitest.h>
 
+#include <wingdi.h>
 #include "init.h"
 
-
 void Test_CreateDIBPatternBrush()
 {
 
index 0c75f16..3be66e8 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winuser.h>
 #include <pseh/pseh2.h>
index 0422395..e4a378d 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 #define INVALIDFONT "ThisFontDoesNotExist"
index fe81271..c017b2e 100644 (file)
@@ -5,9 +5,9 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
-#include <wingdi.h>
+#include <apitest.h>
 
+#include <wingdi.h>
 
 void
 Test_CreateFontIndirectA(void)
index 59e7000..bfd78e2 100644 (file)
@@ -1,5 +1,6 @@
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winuser.h>
 
index 1f818b4..ad03b3b 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winddi.h>
 #include <include/ntgdityp.h>
index bbe1769..e590469 100644 (file)
@@ -5,7 +5,7 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
 
 void Test_CreateRectRgn()
 {
index 3ecd0fa..940e7a7 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winuser.h>
 
index fadb8f9..9401454 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Magnus Olsen
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winddi.h>
 
index e2d4877..eb6ccec 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Magnus Olsen
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winddi.h>
 
index 25dad71..f129fb9 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Magnus Olsen
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winddi.h>
 
index c1e3e7c..c6d20bb 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Magnus Olsen
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winddi.h>
 
index 84c0f95..3c62547 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winddi.h>
 #include <include/ntgdityp.h>
index fb3a0a0..78f5899 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 HBITMAP WINAPI GdiConvertBitmap(HBITMAP hbm);
index 640a268..4fb97f3 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 HBRUSH WINAPI GdiConvertBrush(HBRUSH hbr);
index 4ad2b1b..dd9f736 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 HDC WINAPI GdiConvertDC(HDC hdc);
index 48bdc79..d8e9078 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 HFONT WINAPI GdiConvertFont(HFONT);
index 7721beb..85dc878 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 HPALETTE WINAPI GdiConvertPalette(HPALETTE);
index 503fd4d..028842c 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 HRGN WINAPI GdiConvertRegion(HRGN);
index 76194c2..6de9eba 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 BOOL WINAPI GdiDeleteLocalDC(HDC);
index 24672e6..2f03dfe 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 void Test_GdiGetCharDimensions()
index 76e1323..7af9a1a 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 HBRUSH WINAPI GdiGetLocalBrush(HBRUSH hbr);
index 2c9b1cf..e445da1 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 HDC WINAPI GdiGetLocalDC(HDC);
index a65f63a..2c9572c 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 BOOL WINAPI GdiReleaseLocalDC(HDC);
index 7e7ef1c..537250e 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 BOOL WINAPI GdiSetAttrs(HDC);
index 619836c..c952d22 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winuser.h>
 
index 65a1759..5aea265 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winddi.h>
 #include <winuser.h>
index feeac82..ff70091 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 void Test_GetDIBColorTable()
index 7f03a81..86aa6d3 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winuser.h>
 
index 5a6fa02..6ab39ee 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winddi.h>
 #include <winuser.h>
index d8e14cf..ddd6ed7 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Jérôme Gardou
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 void Test_GetPixel_1bpp()
index 947dd4e..e2f4d74 100644 (file)
@@ -5,8 +5,9 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
+#include <apitest.h>
+
 #include <stdio.h>
-#include <wine/test.h>
 #include <wingdi.h>
 #include <winuser.h>
 
index 14c9336..4f7c01e 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winddi.h>
 #include <include/ntgdityp.h>
index 35b9ad9..594838c 100644 (file)
@@ -5,8 +5,9 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
+#include <apitest.h>
+
 #include <stdio.h>
-#include <wine/test.h>
 #include <wingdi.h>
 #include <winuser.h>
 
index dba06d3..9686d1b 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 #define TEST(x) ok(x, #x"\n")
index 492aa9a..dcdcda1 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winuser.h>
 
index 18832f1..c80f519 100644 (file)
@@ -5,8 +5,9 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
+#include <apitest.h>
+
 #include <stdio.h>
-#include <wine/test.h>
 #include <wingdi.h>
 
 HBITMAP ghbmpTarget;
index 4dfa212..308680c 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Jérôme Gardou
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 void Test_Rectangle(void)
index 77cfb3a..077593b 100644 (file)
@@ -5,8 +5,9 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
+#include <apitest.h>
+
 #include <stdio.h>
-#include <wine/test.h>
 #include <wingdi.h>
 #include <winddi.h>
 #include <winuser.h>
index 576d135..fdc9f7e 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <pseh/pseh2.h>
 
index bd3c468..0f91656 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winuser.h>
 
index 84405fa..6a00814 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Jérôme Gardou
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 
 void Test_SetDIBits()
index 18f4a88..8b36866 100644 (file)
@@ -5,9 +5,9 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
-#include <wingdi.h>
+#include <apitest.h>
 
+#include <wingdi.h>
 #include "init.h"
 
 static void
index fd79583..7c8c048 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winuser.h>
 
index aded593..1d27583 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <mmsystem.h>
 
index 7250e1a..d662996 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winuser.h>
 
index 5338234..70f1e55 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winuser.h>
 
index 5c73ece..55e9e09 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMERS:     Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <wingdi.h>
 #include <winuser.h>
 
index 2724d3b..789ef61 100644 (file)
@@ -1,7 +1,7 @@
 #define __ROS_LONG64__
 
 #define STANDALONE
-#include <wine/test.h>
+#include <apitest.h>
 
 extern void func_AddFontResource(void);
 extern void func_AddFontResourceEx(void);
diff --git a/rostests/apitests/include/apitest.h b/rostests/apitests/include/apitest.h
new file mode 100644 (file)
index 0000000..85d241b
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef _APITEST_H
+#define _APITEST_H
+
+// #define __ROS_LONG64__
+
+#define WIN32_NO_STATUS
+
+/* The user must #define STANDALONE if it uses this header in testlist.c */
+#include <wine/test.h>
+#include <pseh/pseh2.h>
+
+/* See kmtests/include/kmt_test.h */
+#define InvalidPointer ((PVOID)0x5555555555555555ULL)
+
+#define StartSeh()                                  \
+    ExceptionStatus = STATUS_SUCCESS;               \
+    _SEH2_TRY                                       \
+    {
+#define EndSeh(ExpectedStatus)                      \
+    }                                               \
+    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)         \
+    {                                               \
+        ExceptionStatus = _SEH2_GetExceptionCode(); \
+    }                                               \
+    _SEH2_END;                                      \
+    ok(ExceptionStatus == ExpectedStatus, "Exception 0x%08lx, expected 0x%08lx\n", ExceptionStatus, ExpectedStatus)
+
+#endif /* _APITEST_H */
index 8350d2e..52a031a 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMER:      Hermès BÉLUSCA - MAÏTO
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <windows.h>
 
 /*
index a927169..6da946d 100644 (file)
@@ -5,9 +5,10 @@
  * PROGRAMMER:      Thomas Faber <thfabba@gmx.de>
  */
 
+#include <apitest.h>
+
 #define WIN32_NO_STATUS
 #include <stdio.h>
-#include <wine/test.h>
 #include <ndk/rtltypes.h>
 
 static
index e5b79c8..00b534c 100644 (file)
@@ -1,4 +1,4 @@
-#include <wine/test.h>
+#include <apitest.h>
 
 #define IS_DRIVE_TYPE_VALID(type) ((type) != DRIVE_UNKNOWN && (type) != DRIVE_NO_ROOT_DIR)
 
index f0d6f14..4b16319 100644 (file)
@@ -5,12 +5,12 @@
  * PROGRAMMER:      Thomas Faber <thfabba@gmx.de>
  */
 
+#include <apitest.h>
+
 #define WIN32_NO_STATUS
 #define _INC_WINDOWS
 #define COM_NO_WINDOWS_H
-#define UNICODE
 #include <stdio.h>
-#include <wine/test.h>
 #include <winreg.h>
 #include <winnls.h>
 #include <shlwapi.h>
@@ -24,7 +24,7 @@ StartChild(char **argv)
     PWSTR FileName;
     PWSTR Slash;
     WCHAR CommandLine[MAX_PATH];
-    STARTUPINFO StartupInfo;
+    STARTUPINFOW StartupInfo;
     PROCESS_INFORMATION ProcessInfo;
     DWORD Ret;
     int Length;
@@ -48,7 +48,7 @@ StartChild(char **argv)
         FileName++;
         FileName[-1] = L'\0';
 
-        Success = SetCurrentDirectory(Path);
+        Success = SetCurrentDirectoryW(Path);
         ok(Success == TRUE, "SetCurrentDirectory failed for path '%ls'\n", Path);
 
         trace("Starting '%ls' in path '%ls'\n", FileName, Path);
@@ -64,16 +64,16 @@ StartChild(char **argv)
     RtlZeroMemory(&StartupInfo, sizeof(StartupInfo));
     StartupInfo.cb = sizeof(StartupInfo);
 
-    Success = CreateProcess(FileName,
-                            CommandLine,
-                            NULL,
-                            NULL,
-                            FALSE,
-                            0,
-                            NULL,
-                            NULL,
-                            &StartupInfo,
-                            &ProcessInfo);
+    Success = CreateProcessW(FileName,
+                             CommandLine,
+                             NULL,
+                             NULL,
+                             FALSE,
+                             0,
+                             NULL,
+                             NULL,
+                             &StartupInfo,
+                             &ProcessInfo);
     if (!Success)
     {
         skip("CreateProcess failed with %lu\n", GetLastError());
index 0dd6ce6..00242a6 100644 (file)
@@ -5,9 +5,9 @@
  * PROGRAMMER:      Mike "tamlin" Nordell
  */
 
-#include <wine/test.h>
-#include <winnls.h>
+#include <apitest.h>
 
+#include <winnls.h>
 
 START_TEST(MultiByteToWideChar)
 {
index be20bd9..e55409c 100644 (file)
@@ -5,9 +5,10 @@
  * PROGRAMMER:      Thomas Faber <thfabba@gmx.de>
  */
 
+#include <apitest.h>
+
 #define WIN32_NO_STATUS
 #include <stdio.h>
-#include <wine/test.h>
 #include <ndk/rtltypes.h>
 
 static
index 0105575..ddf6b3f 100644 (file)
@@ -5,9 +5,10 @@
  * PROGRAMMER:      Mike "tamlin" Nordell
  */
 
+#include <apitest.h>
+
 #define WIN32_NO_STATUS
 #include <stdio.h>
-#include <wine/test.h>
 #include <ndk/rtltypes.h>
 #include <xmmintrin.h>
 
index 7bdd6ef..a6e953b 100644 (file)
@@ -4,9 +4,10 @@
  * PURPOSE:         Test for lstrcpynW
  */
 
+#include <apitest.h>
+
 #define WIN32_NO_STATUS
 #include <stdio.h>
-#include <wine/test.h>
 
 START_TEST(lstrcpynW)
 {
index 08b6caf..94cff64 100644 (file)
@@ -1,7 +1,7 @@
 #define __ROS_LONG64__
 
 #define STANDALONE
-#include <wine/test.h>
+#include <apitest.h>
 
 extern void func_FindFiles(void);
 extern void func_GetCurrentDirectory(void);
index c466d55..7f752fd 100644 (file)
@@ -5,10 +5,10 @@
  * PROGRAMMER:      Hermès BÉLUSCA - MAÏTO <hermes.belusca@sfr.fr>
  */
 
+#include <apitest.h>
+
 #define WIN32_NO_STATUS
-#define UNICODE
 #include <stdio.h>
-#include <wine/test.h>
 #include <ndk/umtypes.h>
 
 #include "./CmdLineUtil/CmdLineUtil.h"
index 814b1c3..5ecd8b1 100644 (file)
@@ -6,7 +6,8 @@
  * REFERENCES:      http://msdn.microsoft.com/en-US/library/h7zkk1bz%28v=VS.80%29.aspx
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <float.h>
 #include <math.h>
 
index db4ae60..55f8277 100644 (file)
@@ -5,7 +5,8 @@
  * PROGRAMMER:      Timo Kreuzer
  */
 
-#include <wine/test.h>
+#include <apitest.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <strings.h>
index 505205e..96a9ef4 100644 (file)
@@ -1,7 +1,7 @@
 #define __ROS_LONG64__
 
 #define STANDALONE
-#include <wine/test.h>
+#include <apitest.h>
 
 extern void func_CommandLine(void);
 extern void func_ieee(void);