[PATCH 3/3] mfplat/tests: Add MFCreateAttributes test
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Fri Jul 7 23:15:16 CDT 2017
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/mfplat/tests/Makefile.in | 2 +-
dlls/mfplat/tests/mfplat.c | 24 ++++++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/dlls/mfplat/tests/Makefile.in b/dlls/mfplat/tests/Makefile.in
index a5553a5af3..ac5aaf4fe7 100644
--- a/dlls/mfplat/tests/Makefile.in
+++ b/dlls/mfplat/tests/Makefile.in
@@ -1,5 +1,5 @@
TESTDLL = mfplat.dll
-IMPORTS = ole32 mfplat
+IMPORTS = ole32 mfplat mfuuid
C_SRCS = \
mfplat.c
diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c
index edbce460ec..87eafed63c 100644
--- a/dlls/mfplat/tests/mfplat.c
+++ b/dlls/mfplat/tests/mfplat.c
@@ -32,6 +32,7 @@
#include "mfapi.h"
#include "mfidl.h"
#include "mferror.h"
+#include "mfreadwrite.h"
#include "wine/test.h"
@@ -217,6 +218,28 @@ if(0)
MFShutdown();
}
+static void test_MFCreateAttributes(void)
+{
+ IMFAttributes *attributes;
+ HRESULT hr;
+ UINT32 count = 0;
+
+ hr = MFCreateAttributes( &attributes, 3 );
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hr = IMFAttributes_GetCount(attributes, &count);
+ todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(count == 0, "got %d\n", count);
+
+ hr = IMFAttributes_SetUINT32(attributes, &MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, 0);
+ todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hr = IMFAttributes_GetCount(attributes, &count);
+ todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
+ todo_wine ok(count == 1, "got %d\n", count);
+
+ IMFAttributes_Release(attributes);
+}
START_TEST(mfplat)
{
@@ -227,6 +250,7 @@ START_TEST(mfplat)
test_register();
test_source_resolver();
test_MFCreateMediaType();
+ test_MFCreateAttributes();
CoUninitialize();
}
--
2.13.2
More information about the wine-patches
mailing list