<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 24, 2016 at 3:43 PM, Stefan Dösinger <span dir="ltr"><<a href="mailto:stefandoesinger@gmail.com" target="_blank">stefandoesinger@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA256<br>
<span><br>
Am 2016-04-24 um 06:40 schrieb Aaryaman Vasishta:<br>
> +    size = 1;<br>
> +    hr = IDirect3DRMTexture_GetClassName(texture1, &size, cname);<br>
> +    ok(hr == E_INVALIDARG, "GetClassName failed with %x\n", hr);<br>
> +    size = sizeof(cname);<br>
> +    hr = IDirect3DRMTexture_GetClassName(texture1, &size, cname);<br>
> +    ok(SUCCEEDED(hr), "Cannot get classname (hr = %x)\n", hr);<br>
> +    ok(size == sizeof("Texture"), "wrong size: %u\n", size);<br>
</span>sizeof("Texture") is confusing IMHO. I had to look up the C rules on<br>
string literals to make sure it does what you want :-) . Though I'm not<br>
sure if its better than strlen("Texture") + 1, so it's your call.<br>
<br>
However, the current implementation in d3drm_texture3_GetClassName<br>
confuses the two. I recommend adding a test for sizeof("Texture") - 1<br>
and an exactly matching size.<br>
<br></blockquote><div>I hadn't really paid attention to that since the plan was to just extend the existing tests to version 2 and 3. But I will add these tests as you want.<br></div><div>By exactly matching size, did you mean sizeof("Texture") itself? Isn't that already there? I might have missed something here.<br><br></div><div>Cheers,<br></div><div>Aaryaman <br></div></div><br></div></div>