Author: mbosma
Date: Sun May 13 21:58:05 2007
New Revision: 26759
URL:
http://svn.reactos.org/svn/reactos?rev=26759&view=rev
Log:
Some more CreateSurface Tests (for invaild flags)
Modified:
trunk/rostests/dxtest/ddraw/tests/CreateDDraw.cpp
trunk/rostests/dxtest/ddraw/tests/CreateSurface.cpp
Modified: trunk/rostests/dxtest/ddraw/tests/CreateDDraw.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/dxtest/ddraw/tests/Create…
==============================================================================
--- trunk/rostests/dxtest/ddraw/tests/CreateDDraw.cpp (original)
+++ trunk/rostests/dxtest/ddraw/tests/CreateDDraw.cpp Sun May 13 21:58:05 2007
@@ -13,10 +13,9 @@
TEST (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw4, NULL) ==
DDERR_INVALIDPARAMS);
TEST (DirectDrawCreateEx(NULL, NULL, IID_IDirectDraw7, NULL) == DDERR_INVALIDPARAMS);
TEST (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL) ==
DD_OK);
- TEST (DirectDraw && DirectDraw->Release());
+ //TEST (DirectDraw && DirectDraw->Release());
TEST (DirectDrawCreate(NULL ,&DirectDraw2, NULL) == DD_OK);
- TEST (DirectDraw2 && DirectDraw2->Release());
-
+ //TEST (DirectDraw2 && DirectDraw2->Release());
return TRUE;
}
Modified: trunk/rostests/dxtest/ddraw/tests/CreateSurface.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/dxtest/ddraw/tests/Create…
==============================================================================
--- trunk/rostests/dxtest/ddraw/tests/CreateSurface.cpp (original)
+++ trunk/rostests/dxtest/ddraw/tests/CreateSurface.cpp Sun May 13 21:58:05 2007
@@ -46,9 +46,56 @@
TEST ( DirectDrawSurface && DirectDrawSurface->Release() == DD_OK );
DirectDrawSurface = NULL;
+ Desc.ddsCaps.dwCaps = DDSCAPS_TEXTURE;
+ TEST ( DirectDraw->CreateSurface(&Desc, &DirectDrawSurface, NULL) ==
DDERR_INVALIDPARAMS);
+
+ DirectDrawSurface = NULL;
+ Desc.ddsCaps.dwCaps = DDSCAPS_3DDEVICE;
+ TEST ( DirectDraw->CreateSurface(&Desc, &DirectDrawSurface, NULL) ==
DDERR_INVALIDPARAMS);
+
+ DirectDrawSurface = NULL;
+ Desc.ddsCaps.dwCaps = DDSCAPS_ALLOCONLOAD;
+ TEST ( DirectDraw->CreateSurface(&Desc, &DirectDrawSurface, NULL) ==
DDERR_INVALIDCAPS);
+
+ DirectDrawSurface = NULL;
+ Desc.ddsCaps.dwCaps = DDSCAPS_ALPHA;
+ TEST ( DirectDraw->CreateSurface(&Desc, &DirectDrawSurface, NULL) ==
DDERR_INVALIDPARAMS);
+
+ DirectDrawSurface = NULL;
Desc.ddsCaps.dwCaps = DDSCAPS_BACKBUFFER;
- TEST ( DirectDraw->CreateSurface(&Desc, &DirectDrawSurface, NULL) == DD_OK
);
- TEST ( DirectDrawSurface && DirectDrawSurface->Release() == DD_OK );
+ TEST ( DirectDraw->CreateSurface(&Desc, &DirectDrawSurface, NULL) ==
DDERR_INVALIDCAPS);
+
+ DirectDrawSurface = NULL;
+ Desc.ddsCaps.dwCaps = DDSCAPS_COMPLEX;
+ TEST ( DirectDraw->CreateSurface(&Desc, &DirectDrawSurface, NULL) ==
DDERR_INVALIDCAPS);
+
+ DirectDrawSurface = NULL;
+ Desc.ddsCaps.dwCaps = DDSCAPS_FLIP;
+ TEST ( DirectDraw->CreateSurface(&Desc, &DirectDrawSurface, NULL) ==
DDERR_INVALIDCAPS);
+
+ DirectDrawSurface = NULL;
+ Desc.ddsCaps.dwCaps = DDSCAPS_HWCODEC;
+ TEST ( DirectDraw->CreateSurface(&Desc, &DirectDrawSurface, NULL) ==
DDERR_INVALIDPARAMS);
+
+ DirectDrawSurface = NULL;
+ Desc.ddsCaps.dwCaps = DDSCAPS_LIVEVIDEO;
+ TEST ( DirectDraw->CreateSurface(&Desc, &DirectDrawSurface, NULL) ==
DDERR_INVALIDPARAMS);
+
+ DirectDrawSurface = NULL;
+ Desc.ddsCaps.dwCaps = DDSCAPS_LOCALVIDMEM;
+ TEST ( DirectDraw->CreateSurface(&Desc, &DirectDrawSurface, NULL) ==
DDERR_INVALIDCAPS);
+
+ DirectDrawSurface = NULL;
+ Desc.ddsCaps.dwCaps = DDSCAPS_MIPMAP;
+ TEST ( DirectDraw->CreateSurface(&Desc, &DirectDrawSurface, NULL) ==
DDERR_INVALIDCAPS);
+
+ DirectDrawSurface = NULL;
+ Desc.ddsCaps.dwCaps = DDSCAPS_MODEX;
+ TEST ( DirectDraw->CreateSurface(&Desc, &DirectDrawSurface, NULL) ==
DDERR_INVALIDPARAMS);
+
+ DirectDrawSurface = NULL;
+ Desc.ddsCaps.dwCaps = DDSCAPS_MODEX;
+ TEST ( DirectDraw->CreateSurface(&Desc, &DirectDrawSurface, NULL) ==
DDERR_INVALIDPARAMS);
DirectDraw->Release();