gdiplus/tests: Enable floating point exceptions.

Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Vincent Povirk 2017-07-25 15:15:48 -05:00 committed by Alexandre Julliard
parent 331a7af37a
commit 8f54e2034e
12 changed files with 84 additions and 0 deletions

View File

@ -1273,6 +1273,13 @@ START_TEST(brush)
{
struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
HMODULE hmsvcrt;
int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask);
/* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */
hmsvcrt = LoadLibraryA("msvcrt");
_controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s");
if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e);
gdiplusStartupInput.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL;

View File

@ -315,6 +315,13 @@ START_TEST(customlinecap)
{
struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
HMODULE hmsvcrt;
int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask);
/* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */
hmsvcrt = LoadLibraryA("msvcrt");
_controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s");
if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e);
gdiplusStartupInput.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL;

View File

@ -1114,6 +1114,13 @@ START_TEST(font)
{
struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
HMODULE hmsvcrt;
int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask);
/* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */
hmsvcrt = LoadLibraryA("msvcrt");
_controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s");
if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e);
gdiplusStartupInput.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL;

View File

@ -6154,6 +6154,13 @@ START_TEST(graphics)
struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
WNDCLASSA class;
HMODULE hmsvcrt;
int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask);
/* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */
hmsvcrt = LoadLibraryA("msvcrt");
_controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s");
if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e);
memset( &class, 0, sizeof(class) );
class.lpszClassName = "gdiplus_test";

View File

@ -1329,6 +1329,13 @@ START_TEST(graphicspath)
{
struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
HMODULE hmsvcrt;
int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask);
/* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */
hmsvcrt = LoadLibraryA("msvcrt");
_controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s");
if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e);
gdiplusStartupInput.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL;

View File

@ -4971,6 +4971,13 @@ START_TEST(image)
HMODULE mod = GetModuleHandleA("gdiplus.dll");
struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
HMODULE hmsvcrt;
int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask);
/* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */
hmsvcrt = LoadLibraryA("msvcrt");
_controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s");
if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e);
gdiplusStartupInput.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL;

View File

@ -343,6 +343,13 @@ START_TEST(matrix)
{
struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
HMODULE hmsvcrt;
int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask);
/* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */
hmsvcrt = LoadLibraryA("msvcrt");
_controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s");
if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e);
gdiplusStartupInput.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL;

View File

@ -2745,6 +2745,13 @@ START_TEST(metafile)
ULONG_PTR gdiplusToken;
int myARGC;
char **myARGV;
HMODULE hmsvcrt;
int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask);
/* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */
hmsvcrt = LoadLibraryA("msvcrt");
_controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s");
if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e);
gdiplusStartupInput.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL;

View File

@ -559,6 +559,13 @@ START_TEST(pathiterator)
{
struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
HMODULE hmsvcrt;
int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask);
/* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */
hmsvcrt = LoadLibraryA("msvcrt");
_controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s");
if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e);
gdiplusStartupInput.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL;

View File

@ -455,6 +455,13 @@ START_TEST(pen)
{
struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
HMODULE hmsvcrt;
int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask);
/* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */
hmsvcrt = LoadLibraryA("msvcrt");
_controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s");
if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e);
test_startup();

View File

@ -2262,6 +2262,13 @@ START_TEST(region)
{
struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
HMODULE hmsvcrt;
int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask);
/* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */
hmsvcrt = LoadLibraryA("msvcrt");
_controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s");
if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e);
gdiplusStartupInput.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL;

View File

@ -438,6 +438,13 @@ START_TEST(stringformat)
{
struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
HMODULE hmsvcrt;
int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask);
/* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */
hmsvcrt = LoadLibraryA("msvcrt");
_controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s");
if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e);
gdiplusStartupInput.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL;