kernel32/tests/atom: remove win9x hacks

Dmitry Timoshkov dmitry at baikal.ru
Tue Jul 26 22:48:34 CDT 2011


Austin English <austinenglish at gmail.com> wrote:

>          len = GlobalGetAtomNameA( (ATOM)i, buf, 2);
> -	if (!len) /* the NT way */
> -	{
> -	    ok(GetLastError() == (i ? ERROR_MORE_DATA : ERROR_INVALID_PARAMETER) ||
> -               GetLastError() == 0xdeadbeef,  /* the Win 9x way */
> -               "wrong error conditions %u for %u\n", GetLastError(), i);
> -	}
> -	else /* the Win 9x way */
> -	{
> -	    ok(GetLastError() == 0xdeadbeef,
> -               "wrong error conditions %u for %u\n", GetLastError(), i);
> -	}
> +        ok(GetLastError() == ERROR_MORE_DATA || GetLastError() == ERROR_INVALID_PARAMETER,
> +            "wrong error conditions %u for %u\n", GetLastError(), i);
>      }

You should add an ok(!len) check here.
 
>      len = GlobalGetAtomNameA(atom, out, 10);
> -    if (!len) /* the NT way */
> -    {
> -        ok(GetLastError() == ERROR_MORE_DATA, "wrong error code (%u instead of %u)\n", GetLastError(), ERROR_MORE_DATA);
> -    }
> -    else /* the Win9x way */
> -    {
> -        ok(GetLastError() == 0xdeadbeef, "wrong error code (%u instead of %u)\n", GetLastError(), 0xdeadbeef);
> -    }
> +    ok(GetLastError() == ERROR_MORE_DATA, "wrong error code (%u instead of %u)\n", GetLastError(), ERROR_MORE_DATA);

And here.

-- 
Dmitry.



More information about the wine-devel mailing list