[PATCH] mmdevapi/tests: Only warn about the console when it is used.

Andrew Eikum aeikum at codeweavers.com
Thu Nov 12 10:10:30 CST 2020


Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>

On Mon, Nov 09, 2020 at 05:39:49PM +0100, Francois Gouget wrote:
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> ---
> 
> This way the presence of the trace is a sign that the results should 
> maybe not be trusted.
> 
>  dlls/mmdevapi/tests/render.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c
> index 3ad00eaa2e2..8c82a1a81fd 100644
> --- a/dlls/mmdevapi/tests/render.c
> +++ b/dlls/mmdevapi/tests/render.c
> @@ -2346,6 +2346,7 @@ static void test_endpointvolume(void)
>  START_TEST(render)
>  {
>      HRESULT hr;
> +    DWORD mode;
>  
>      CoInitializeEx(NULL, COINIT_MULTITHREADED);
>      hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, (void**)&mme);
> @@ -2371,8 +2372,11 @@ START_TEST(render)
>      test_formats(AUDCLNT_SHAREMODE_SHARED);
>      test_references();
>      test_marshal();
> -    trace("Output to a MS-DOS console is particularly slow and disturbs timing.\n");
> -    trace("Please redirect output to a file.\n");
> +    if (GetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), &mode))
> +    {
> +        trace("Output to a MS-DOS console is particularly slow and disturbs timing.\n");
> +        trace("Please redirect output to a file.\n");
> +    }
>      test_event();
>      test_padding();
>      test_clock(1);
> -- 
> 2.20.1
> 
> 



More information about the wine-devel mailing list