Commit 0a0fe209 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

d3drm/tests: Add GetClassName tests.

parent d8ed347a
......@@ -190,6 +190,7 @@ static void test_MeshBuilder(void)
char name[10];
DWORD size;
D3DCOLOR color;
CHAR cname[64] = {0};
hr = pDirect3DRMCreate(&pD3DRM);
ok(hr == D3DRM_OK, "Cannot get IDirect3DRM interface (hr = %x)\n", hr);
......@@ -197,6 +198,14 @@ static void test_MeshBuilder(void)
hr = IDirect3DRM_CreateMeshBuilder(pD3DRM, &pMeshBuilder);
ok(hr == D3DRM_OK, "Cannot get IDirect3DRMMeshBuilder interface (hr = %x)\n", hr);
size = sizeof(cname);
hr = IDirect3DRMMeshBuilder_GetClassName(pMeshBuilder, &size, cname);
todo_wine {
ok(hr == D3DRM_OK, "Cannot get classname (hr = %x)\n", hr);
ok(size != sizeof(cname), "size didn't change: %u\n", size);
ok(!strcmp(cname, "Builder"), "Expected cname to be \"Builder\", but got \"%s\"\n", cname);
}
info.lpMemory = data_bad_version;
info.dSize = strlen(data_bad_version);
hr = IDirect3DRMMeshBuilder_Load(pMeshBuilder, &info, NULL, D3DRMLOAD_FROMMEMORY, NULL, NULL);
......@@ -437,6 +446,8 @@ static void test_MeshBuilder3(void)
int val;
DWORD val1;
D3DVALUE valu, valv;
DWORD size;
CHAR cname[64] = {0};
hr = pDirect3DRMCreate(&pD3DRM);
ok(hr == D3DRM_OK, "Cannot get IDirect3DRM interface (hr = %x)\n", hr);
......@@ -452,6 +463,14 @@ static void test_MeshBuilder3(void)
hr = IDirect3DRM3_CreateMeshBuilder(pD3DRM3, &pMeshBuilder3);
ok(hr == D3DRM_OK, "Cannot get IDirect3DRMMeshBuilder3 interface (hr = %x)\n", hr);
size = sizeof(cname);
hr = IDirect3DRMMeshBuilder3_GetClassName(pMeshBuilder3, &size, cname);
todo_wine {
ok(hr == D3DRM_OK, "Cannot get classname (hr = %x)\n", hr);
ok(size != sizeof(cname), "size didn't change: %u\n", size);
ok(!strcmp(cname, "Builder"), "Expected cname to be \"Builder\", but got \"%s\"\n", cname);
}
info.lpMemory = data_bad_version;
info.dSize = strlen(data_bad_version);
hr = IDirect3DRMMeshBuilder3_Load(pMeshBuilder3, &info, NULL, D3DRMLOAD_FROMMEMORY, NULL, NULL);
......@@ -541,6 +560,7 @@ static void test_Frame(void)
LPDIRECT3DRMLIGHT pLightTmp;
LPDIRECT3DRMLIGHTARRAY pLightArray;
DWORD count;
CHAR cname[64] = {0};
hr = pDirect3DRMCreate(&pD3DRM);
ok(hr == D3DRM_OK, "Cannot get IDirect3DRM interface (hr = %x)\n", hr);
......@@ -549,6 +569,14 @@ static void test_Frame(void)
ok(hr == D3DRM_OK, "Cannot get IDirect3DRMFrame interface (hr = %x)\n", hr);
CHECK_REFCOUNT(pFrameC, 1);
count = sizeof(cname);
hr = IDirect3DRMFrame_GetClassName(pFrameC, &count, cname);
todo_wine {
ok(hr == D3DRM_OK, "Cannot get classname (hr = %x)\n", hr);
ok(count != sizeof(cname), "size didn't change: %u\n", count);
ok(!strcmp(cname, "Frame"), "Expected cname to be \"Frame\", but got \"%s\"\n", cname);
}
hr = IDirect3DRMFrame_GetParent(pFrameC, NULL);
ok(hr == D3DRMERR_BADVALUE, "Should fail and return D3DRM_BADVALUE (hr = %x)\n", hr);
pFrameTmp = (void*)0xdeadbeef;
......@@ -837,6 +865,8 @@ static void test_Light(void)
LPDIRECT3DRMLIGHT pLight;
D3DRMLIGHTTYPE type;
D3DCOLOR color;
DWORD size;
CHAR cname[64] = {0};
hr = pDirect3DRMCreate(&pD3DRM);
ok(hr == D3DRM_OK, "Cannot get IDirect3DRM interface (hr = %x)\n", hr);
......@@ -844,6 +874,14 @@ static void test_Light(void)
hr = IDirect3DRM_CreateLightRGB(pD3DRM, D3DRMLIGHT_SPOT, 0.5, 0.5, 0.5, &pLight);
ok(hr == D3DRM_OK, "Cannot get IDirect3DRMLight interface (hr = %x)\n", hr);
size = sizeof(cname);
hr = IDirect3DRMLight_GetClassName(pLight, &size, cname);
todo_wine {
ok(hr == D3DRM_OK, "Cannot get classname (hr = %x)\n", hr);
ok(size != sizeof(cname), "size didn't change: %u\n", size);
ok(!strcmp(cname, "Light"), "Expected cname to be \"Light\", but got \"%s\"\n", cname);
}
type = IDirect3DRMLight_GetType(pLight);
ok(type == D3DRMLIGHT_SPOT, "wrong type (%u)\n", type);
......
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