mirror of
https://github.com/reactos/reactos.git
synced 2025-05-23 02:56:09 +00:00
- 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:
parent
34647baaf1
commit
2b31cf640d
13 changed files with 21 additions and 22 deletions
|
@ -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 },
|
||||
|
|
19
rostests/apitests/gdi32api/tests/AddFontResourceEx.c
Normal file
19
rostests/apitests/gdi32api/tests/AddFontResourceEx.c
Normal 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;
|
||||
}
|
|
@ -1,5 +1,3 @@
|
|||
#include "../gdi32api.h"
|
||||
|
||||
INT
|
||||
Test_CreateCompatibleDC(PTESTINFO pti)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#include "../gdi32api.h"
|
||||
|
||||
#define INVALIDFONT "ThisFontDoesNotExist"
|
||||
|
||||
INT
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#include "../gdi32api.h"
|
||||
|
||||
INT
|
||||
Test_CreatePen(PTESTINFO pti)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#include "../gdi32api.h"
|
||||
|
||||
INT
|
||||
Test_CreateRectRgn(PTESTINFO pti)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#include "../gdi32api.h"
|
||||
|
||||
INT
|
||||
Test_ExtCreatePen(PTESTINFO pti)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#include "../gdi32api.h"
|
||||
|
||||
INT
|
||||
Test_GetClipRgn(PTESTINFO pti)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#include "../gdi32api.h"
|
||||
|
||||
static INT
|
||||
Test_General(PTESTINFO pti)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#include "../gdi32api.h"
|
||||
|
||||
INT
|
||||
Test_GetStockObject(PTESTINFO pti)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#include "../gdi32api.h"
|
||||
|
||||
INT
|
||||
Test_SelectObject(PTESTINFO pti)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#include "../gdi32api.h"
|
||||
|
||||
INT
|
||||
Test_SetDCPenColor(PTESTINFO pti)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#include "../gdi32api.h"
|
||||
|
||||
#define NUM_SYSCOLORS 31
|
||||
|
||||
INT
|
||||
|
|
Loading…
Reference in a new issue