<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 09.01.2018 09:28, Jactry Zeng wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAManwEwvA14a6dUby0PexX1d19je0whPaq4oAVB60JF85SF-Ag@mail.gmail.com">Hi
Wei,
<div><br>
</div>
<div>Thanks for contribution!</div>
<div>I have a question about the tests:</div>
<div><br>
</div>
<div>
<div>+</div>
<div>+ SetLastError(0);</div>
<div>+ res = pInternetGetSecurityInfoByURLA<wbr>(url,
&chain, NULL);</div>
<div>+ ok_(__FILE__,line)(res && GetLastError()
== 0,</div>
<div>+ "<wbr>InternetGetSecurityInfoByURLA
failed returned: %x(%u), expected success\n", res,
GetLastError());</div>
<div>+</div>
<div>+ SetLastError(0);</div>
<div>+ res = pInternetGetSecurityInfoByURLA<wbr>(url,
NULL, &flags);</div>
<div>+ ok_(__FILE__,line)(res && GetLastError()
== 0,</div>
<div>+ "<wbr>InternetGetSecurityInfoByURLA
failed returned: %x(%u), expected success\n", res,
GetLastError());</div>
<div> }else {</div>
</div>
<div><br>
</div>
<div>Why not set last error as 0x<span style="color:rgb(0,0,0);white-space:pre-wrap">deadbeef in these two tests</span>?</div>
</blockquote>
<p><br>
</p>
<p>Actually (with a few exceptions when apps really depend on it),
it's better to not test last error on success. Caller should never
use it anyway and it might be polluted by internal calls that
we're not interested in.</p>
<p><br>
</p>
<p>Wei, I sent a modified version of your patch. I hope you're fine
with those changes. Thanks for contribution.</p>
<p><br>
</p>
<p>Jacek<br>
</p>
</body>
</html>