[PATCH 2/2] oleaut32/tests: Report the error when VarParseNumFromStr() fails.
    Dmitry Timoshkov 
    dmitry at baikal.ru
       
    Thu Jul  8 12:53:54 CDT 2021
    
    
  
Francois Gouget <fgouget at codeweavers.com> wrote:
> --- a/dlls/oleaut32/tests/vartest.c
> +++ b/dlls/oleaut32/tests/vartest.c
> @@ -1282,7 +1282,7 @@ static HRESULT convert_str( const char *str, INT dig, ULONG flags,
>  static void expect_NumFromStr( int line, HRESULT hres, NUMPARSE *np, INT a, ULONG b, ULONG c,
>                                 INT d, INT e, INT f )
>  {
> -    if (hres == (HRESULT)S_OK)
> +    if (ok_(__FILE__,line)(hres == (HRESULT)S_OK, "returned %08x\n", hres))
>      {
>          ok_(__FILE__,line)(np->cDig == a, "Expected cDig = %d, got %d\n", a, np->cDig);
>          ok_(__FILE__,line)(np->dwInFlags == b, "Expected dwInFlags = 0x%x, got 0x%x\n", b, np->dwInFlags);
Hiding ok() inside of an if() is one of the worst things I've ever seen.
-- 
Dmitry.
    
    
More information about the wine-devel
mailing list