From dc57a265f136c6a95f227072078c6236eabdbad5 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Thu, 1 Apr 2021 23:22:58 +0300 Subject: [PATCH] mfplay/tests: Add a basic test for player creation. Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- configure | 1 + configure.ac | 1 + dlls/mfplay/Makefile.in | 1 + dlls/mfplay/tests/Makefile.in | 5 +++++ dlls/mfplay/tests/mfplay.c | 42 +++++++++++++++++++++++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 dlls/mfplay/tests/Makefile.in create mode 100644 dlls/mfplay/tests/mfplay.c diff --git a/configure b/configure index a19bb0b9581..cf34fa3ada5 100755 --- a/configure +++ b/configure @@ -20739,6 +20739,7 @@ wine_fn_config_makefile dlls/mfmediaengine/tests enable_tests wine_fn_config_makefile dlls/mfplat enable_mfplat wine_fn_config_makefile dlls/mfplat/tests enable_tests wine_fn_config_makefile dlls/mfplay enable_mfplay +wine_fn_config_makefile dlls/mfplay/tests enable_tests wine_fn_config_makefile dlls/mfreadwrite enable_mfreadwrite wine_fn_config_makefile dlls/mfreadwrite/tests enable_tests wine_fn_config_makefile dlls/mfuuid enable_mfuuid diff --git a/configure.ac b/configure.ac index eb08e8b0f17..95eb04d6d49 100644 --- a/configure.ac +++ b/configure.ac @@ -3414,6 +3414,7 @@ WINE_CONFIG_MAKEFILE(dlls/mfmediaengine/tests) WINE_CONFIG_MAKEFILE(dlls/mfplat) WINE_CONFIG_MAKEFILE(dlls/mfplat/tests) WINE_CONFIG_MAKEFILE(dlls/mfplay) +WINE_CONFIG_MAKEFILE(dlls/mfplay/tests) WINE_CONFIG_MAKEFILE(dlls/mfreadwrite) WINE_CONFIG_MAKEFILE(dlls/mfreadwrite/tests) WINE_CONFIG_MAKEFILE(dlls/mfuuid) diff --git a/dlls/mfplay/Makefile.in b/dlls/mfplay/Makefile.in index 0a8645fe840..b21ce0e2161 100644 --- a/dlls/mfplay/Makefile.in +++ b/dlls/mfplay/Makefile.in @@ -1,4 +1,5 @@ MODULE = mfplay.dll +IMPORTLIB = mfplay IMPORTS = uuid mfuuid EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native diff --git a/dlls/mfplay/tests/Makefile.in b/dlls/mfplay/tests/Makefile.in new file mode 100644 index 00000000000..ca08c65ce24 --- /dev/null +++ b/dlls/mfplay/tests/Makefile.in @@ -0,0 +1,5 @@ +TESTDLL = mfplay.dll +IMPORTS = mfplay + +C_SRCS = \ + mfplay.c diff --git a/dlls/mfplay/tests/mfplay.c b/dlls/mfplay/tests/mfplay.c new file mode 100644 index 00000000000..e9b5df95039 --- /dev/null +++ b/dlls/mfplay/tests/mfplay.c @@ -0,0 +1,42 @@ +/* + * Copyright 2021 Nikolay Sivov for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "mfplay.h" + +#include "wine/test.h" + +static void test_create_player(void) +{ + IMFPMediaPlayer *player; + HRESULT hr; + + hr = MFPCreateMediaPlayer(NULL, FALSE, 0, NULL, NULL, &player); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + IMFPMediaPlayer_Release(player); +} + +START_TEST(mfplay) +{ + test_create_player(); +}