Christian Costa : d3dxof: Add test for standard templates.
Alexandre Julliard
julliard at winehq.org
Tue Jun 11 14:27:53 CDT 2013
Module: wine
Branch: master
Commit: f054431c637078e20fbdacb87ac574d6314df519
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f054431c637078e20fbdacb87ac574d6314df519
Author: Christian Costa <titan.costa at gmail.com>
Date: Mon Jun 10 09:19:19 2013 +0200
d3dxof: Add test for standard templates.
---
dlls/d3dxof/tests/d3dxof.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/dlls/d3dxof/tests/d3dxof.c b/dlls/d3dxof/tests/d3dxof.c
index 8d322ad..3a92ce9 100644
--- a/dlls/d3dxof/tests/d3dxof.c
+++ b/dlls/d3dxof/tests/d3dxof.c
@@ -24,6 +24,7 @@
#include "wine/test.h"
#include "initguid.h"
#include "dxfile.h"
+#include "rmxftmpl.h"
#define I2(x) x,0
#define I4(x) x,0,0,0
@@ -1014,6 +1015,32 @@ static void test_complex_object(void)
IDirectXFileEnumObject_Release(enum_object);
IDirectXFile_Release(dxfile);
}
+
+static void test_standard_templates(void)
+{
+ HRESULT ret;
+ IDirectXFile *dxfile = NULL;
+
+ if (!pDirectXFileCreate)
+ {
+ win_skip("DirectXFileCreate is not available\n");
+ return;
+ }
+
+ ret = pDirectXFileCreate(&dxfile);
+ ok(ret == DXFILE_OK, "DirectXFileCreate failed with %#x\n", ret);
+ if (!dxfile)
+ {
+ skip("Couldn't create DirectXFile interface\n");
+ return;
+ }
+
+ ret = IDirectXFile_RegisterTemplates(dxfile, D3DRM_XTEMPLATES, D3DRM_XTEMPLATE_BYTES);
+ ok(ret == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates failed with %#x\n", ret);
+
+ IDirectXFile_Release(dxfile);
+}
+
/* Set it to 1 to expand the string when dumping the object. This is useful when there is
* only one string in a sub-object (very common). Use with care, this may lead to a crash. */
#define EXPAND_STRING 0
@@ -1199,6 +1226,7 @@ START_TEST(d3dxof)
test_syntax();
test_syntax_semicolon_comma();
test_complex_object();
+ test_standard_templates();
test_dump();
FreeLibrary(hd3dxof);
More information about the wine-cvs
mailing list