Author: tkreuzer
Date: Sun Sep 2 02:06:05 2007
New Revision: 28753
URL:
http://svn.reactos.org/svn/reactos?rev=28753&view=rev
Log:
- Add test for AddFontResourceEx showing that the function accepts 0 as flags.
- remove header inclusion in test files
Added:
trunk/rostests/apitests/gdi32api/tests/AddFontResourceEx.c
Modified:
trunk/rostests/apitests/gdi32api/testlist.c
trunk/rostests/apitests/gdi32api/tests/CreateCompatibleDC.c
trunk/rostests/apitests/gdi32api/tests/CreateFont.c
trunk/rostests/apitests/gdi32api/tests/CreatePen.c
trunk/rostests/apitests/gdi32api/tests/CreateRectRgn.c
trunk/rostests/apitests/gdi32api/tests/ExtCreatePen.c
trunk/rostests/apitests/gdi32api/tests/GetClipRgn.c
trunk/rostests/apitests/gdi32api/tests/GetObject.c
trunk/rostests/apitests/gdi32api/tests/GetStockObject.c
trunk/rostests/apitests/gdi32api/tests/SelectObject.c
trunk/rostests/apitests/gdi32api/tests/SetDCPenColor.c
trunk/rostests/apitests/gdi32api/tests/SetSysColors.c
Modified: trunk/rostests/apitests/gdi32api/testlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/testlis…
==============================================================================
--- trunk/rostests/apitests/gdi32api/testlist.c (original)
+++ trunk/rostests/apitests/gdi32api/testlist.c Sun Sep 2 02:06:05 2007
@@ -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 },
Added: trunk/rostests/apitests/gdi32api/tests/AddFontResourceEx.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/A…
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/AddFontResourceEx.c (added)
+++ trunk/rostests/apitests/gdi32api/tests/AddFontResourceEx.c Sun Sep 2 02:06:05 2007
@@ -1,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;
+}
Modified: trunk/rostests/apitests/gdi32api/tests/CreateCompatibleDC.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/C…
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/CreateCompatibleDC.c (original)
+++ trunk/rostests/apitests/gdi32api/tests/CreateCompatibleDC.c Sun Sep 2 02:06:05 2007
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"
-
INT
Test_CreateCompatibleDC(PTESTINFO pti)
{
Modified: trunk/rostests/apitests/gdi32api/tests/CreateFont.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/C…
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/CreateFont.c (original)
+++ trunk/rostests/apitests/gdi32api/tests/CreateFont.c Sun Sep 2 02:06:05 2007
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"
-
#define INVALIDFONT "ThisFontDoesNotExist"
INT
Modified: trunk/rostests/apitests/gdi32api/tests/CreatePen.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/C…
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/CreatePen.c (original)
+++ trunk/rostests/apitests/gdi32api/tests/CreatePen.c Sun Sep 2 02:06:05 2007
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"
-
INT
Test_CreatePen(PTESTINFO pti)
{
Modified: trunk/rostests/apitests/gdi32api/tests/CreateRectRgn.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/C…
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/CreateRectRgn.c (original)
+++ trunk/rostests/apitests/gdi32api/tests/CreateRectRgn.c Sun Sep 2 02:06:05 2007
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"
-
INT
Test_CreateRectRgn(PTESTINFO pti)
{
Modified: trunk/rostests/apitests/gdi32api/tests/ExtCreatePen.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/E…
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/ExtCreatePen.c (original)
+++ trunk/rostests/apitests/gdi32api/tests/ExtCreatePen.c Sun Sep 2 02:06:05 2007
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"
-
INT
Test_ExtCreatePen(PTESTINFO pti)
{
Modified: trunk/rostests/apitests/gdi32api/tests/GetClipRgn.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/G…
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/GetClipRgn.c (original)
+++ trunk/rostests/apitests/gdi32api/tests/GetClipRgn.c Sun Sep 2 02:06:05 2007
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"
-
INT
Test_GetClipRgn(PTESTINFO pti)
{
Modified: trunk/rostests/apitests/gdi32api/tests/GetObject.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/G…
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/GetObject.c (original)
+++ trunk/rostests/apitests/gdi32api/tests/GetObject.c Sun Sep 2 02:06:05 2007
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"
-
static INT
Test_General(PTESTINFO pti)
{
Modified: trunk/rostests/apitests/gdi32api/tests/GetStockObject.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/G…
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/GetStockObject.c (original)
+++ trunk/rostests/apitests/gdi32api/tests/GetStockObject.c Sun Sep 2 02:06:05 2007
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"
-
INT
Test_GetStockObject(PTESTINFO pti)
{
Modified: trunk/rostests/apitests/gdi32api/tests/SelectObject.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/S…
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/SelectObject.c (original)
+++ trunk/rostests/apitests/gdi32api/tests/SelectObject.c Sun Sep 2 02:06:05 2007
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"
-
INT
Test_SelectObject(PTESTINFO pti)
{
Modified: trunk/rostests/apitests/gdi32api/tests/SetDCPenColor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/S…
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/SetDCPenColor.c (original)
+++ trunk/rostests/apitests/gdi32api/tests/SetDCPenColor.c Sun Sep 2 02:06:05 2007
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"
-
INT
Test_SetDCPenColor(PTESTINFO pti)
{
Modified: trunk/rostests/apitests/gdi32api/tests/SetSysColors.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/S…
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/SetSysColors.c (original)
+++ trunk/rostests/apitests/gdi32api/tests/SetSysColors.c Sun Sep 2 02:06:05 2007
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"
-
#define NUM_SYSCOLORS 31
INT