2 * Some unit tests for d3dxof
4 * Copyright (C) 2008 Christian Costa
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include "wine/test.h"
30 "<3D82AB43-62DA-11CF-AB390020AF71E433>\n"
36 static unsigned long getRefcount(IUnknown
*iface
)
38 IUnknown_AddRef(iface
);
39 return IUnknown_Release(iface
);
42 static void test_d3dxof(void)
46 LPDIRECTXFILE lpDirectXFile
= NULL
;
47 hr
= DirectXFileCreate(&lpDirectXFile
);
48 ok(hr
== DXFILE_OK
, "DirectXFileCreate: %x\n", hr
);
51 trace("Couldn't create DirectXFile interface, skipping tests\n");
55 ref
= getRefcount( (IUnknown
*) lpDirectXFile
);
56 ok(ref
== 1, "Got refcount %ld, expected 1\n", ref
);
58 ref
= IDirectXFile_AddRef(lpDirectXFile
);
59 ok(ref
== 2, "Got refcount %ld, expected 1\n", ref
);
61 ref
= IDirectXFile_Release(lpDirectXFile
);
62 ok(ref
== 1, "Got refcount %ld, expected 1\n", ref
);
64 /* RegisterTemplates does not support txt format yet */
65 hr
= IDirectXFile_RegisterTemplates(lpDirectXFile
, template, strlen(template));
66 todo_wine
ok(hr
== DXFILE_OK
, "IDirectXFileImpl_RegisterTemplates: %x\n", hr
);
68 ref
= IDirectXFile_Release(lpDirectXFile
);
69 ok(ref
== 0, "Got refcount %ld, expected 1\n", ref
);