Commit 8f54e203 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus/tests: Enable floating point exceptions.

parent 331a7af3
...@@ -1273,6 +1273,13 @@ START_TEST(brush) ...@@ -1273,6 +1273,13 @@ START_TEST(brush)
{ {
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken; 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.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL; gdiplusStartupInput.DebugEventCallback = NULL;
......
...@@ -315,6 +315,13 @@ START_TEST(customlinecap) ...@@ -315,6 +315,13 @@ START_TEST(customlinecap)
{ {
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken; 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.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL; gdiplusStartupInput.DebugEventCallback = NULL;
......
...@@ -1114,6 +1114,13 @@ START_TEST(font) ...@@ -1114,6 +1114,13 @@ START_TEST(font)
{ {
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken; 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.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL; gdiplusStartupInput.DebugEventCallback = NULL;
......
...@@ -6154,6 +6154,13 @@ START_TEST(graphics) ...@@ -6154,6 +6154,13 @@ START_TEST(graphics)
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken; ULONG_PTR gdiplusToken;
WNDCLASSA class; 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) ); memset( &class, 0, sizeof(class) );
class.lpszClassName = "gdiplus_test"; class.lpszClassName = "gdiplus_test";
......
...@@ -1329,6 +1329,13 @@ START_TEST(graphicspath) ...@@ -1329,6 +1329,13 @@ START_TEST(graphicspath)
{ {
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken; 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.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL; gdiplusStartupInput.DebugEventCallback = NULL;
......
...@@ -4971,6 +4971,13 @@ START_TEST(image) ...@@ -4971,6 +4971,13 @@ START_TEST(image)
HMODULE mod = GetModuleHandleA("gdiplus.dll"); HMODULE mod = GetModuleHandleA("gdiplus.dll");
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken; 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.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL; gdiplusStartupInput.DebugEventCallback = NULL;
......
...@@ -343,6 +343,13 @@ START_TEST(matrix) ...@@ -343,6 +343,13 @@ START_TEST(matrix)
{ {
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken; 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.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL; gdiplusStartupInput.DebugEventCallback = NULL;
......
...@@ -2745,6 +2745,13 @@ START_TEST(metafile) ...@@ -2745,6 +2745,13 @@ START_TEST(metafile)
ULONG_PTR gdiplusToken; ULONG_PTR gdiplusToken;
int myARGC; int myARGC;
char **myARGV; 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.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL; gdiplusStartupInput.DebugEventCallback = NULL;
......
...@@ -559,6 +559,13 @@ START_TEST(pathiterator) ...@@ -559,6 +559,13 @@ START_TEST(pathiterator)
{ {
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken; 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.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL; gdiplusStartupInput.DebugEventCallback = NULL;
......
...@@ -455,6 +455,13 @@ START_TEST(pen) ...@@ -455,6 +455,13 @@ START_TEST(pen)
{ {
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken; 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(); test_startup();
......
...@@ -2262,6 +2262,13 @@ START_TEST(region) ...@@ -2262,6 +2262,13 @@ START_TEST(region)
{ {
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken; 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.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL; gdiplusStartupInput.DebugEventCallback = NULL;
......
...@@ -438,6 +438,13 @@ START_TEST(stringformat) ...@@ -438,6 +438,13 @@ START_TEST(stringformat)
{ {
struct GdiplusStartupInput gdiplusStartupInput; struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken; 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.GdiplusVersion = 1;
gdiplusStartupInput.DebugEventCallback = NULL; gdiplusStartupInput.DebugEventCallback = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment