- Add test for AddFontResourceEx showing that the function accepts 0 as flags.

- remove header inclusion in test files

svn path=/trunk/; revision=28753
This commit is contained in:
Timo Kreuzer 2007-09-01 22:06:05 +00:00
parent 34647baaf1
commit 2b31cf640d
13 changed files with 21 additions and 22 deletions

View file

@ -4,6 +4,7 @@
#include "gdi32api.h"
/* include the tests */
#include "tests/AddFontResourceEx.c"
#include "tests/CreateCompatibleDC.c"
#include "tests/CreateFont.c"
#include "tests/CreatePen.c"
@ -20,6 +21,7 @@
/* The List of tests */
TESTENTRY TestList[] =
{
{ L"AddFontResourceEx", Test_AddFontResourceEx },
{ L"CreateCompatibleDC", Test_CreateCompatibleDC },
{ L"CreateFont", Test_CreateFont },
{ L"CreatePen", Test_CreatePen },

View file

@ -0,0 +1,19 @@
INT
Test_AddFontResourceEx(PTESTINFO pti)
{
WCHAR szFileName[MAX_PATH];
GetEnvironmentVariableW(L"systemroot", szFileName, MAX_PATH);
wcscat(szFileName, L"\\Fonts\\cour.ttf");
SetLastError(ERROR_SUCCESS);
TEST(AddFontResourceExW(szFileName, 0, 0) != 0);
TEST(GetLastError() == ERROR_SUCCESS);
SetLastError(ERROR_SUCCESS);
TEST(AddFontResourceExW(szFileName, 256, 0) == 0);
TEST(GetLastError() == ERROR_INVALID_PARAMETER);
return APISTATUS_NORMAL;
}

View file

@ -1,5 +1,3 @@
#include "../gdi32api.h"
INT
Test_CreateCompatibleDC(PTESTINFO pti)
{

View file

@ -1,5 +1,3 @@
#include "../gdi32api.h"
#define INVALIDFONT "ThisFontDoesNotExist"
INT

View file

@ -1,5 +1,3 @@
#include "../gdi32api.h"
INT
Test_CreatePen(PTESTINFO pti)
{

View file

@ -1,5 +1,3 @@
#include "../gdi32api.h"
INT
Test_CreateRectRgn(PTESTINFO pti)
{

View file

@ -1,5 +1,3 @@
#include "../gdi32api.h"
INT
Test_ExtCreatePen(PTESTINFO pti)
{

View file

@ -1,5 +1,3 @@
#include "../gdi32api.h"
INT
Test_GetClipRgn(PTESTINFO pti)
{

View file

@ -1,5 +1,3 @@
#include "../gdi32api.h"
static INT
Test_General(PTESTINFO pti)
{

View file

@ -1,5 +1,3 @@
#include "../gdi32api.h"
INT
Test_GetStockObject(PTESTINFO pti)
{

View file

@ -1,5 +1,3 @@
#include "../gdi32api.h"
INT
Test_SelectObject(PTESTINFO pti)
{

View file

@ -1,5 +1,3 @@
#include "../gdi32api.h"
INT
Test_SetDCPenColor(PTESTINFO pti)
{

View file

@ -1,5 +1,3 @@
#include "../gdi32api.h"
#define NUM_SYSCOLORS 31
INT