[v2 PATCH 3/3] d3dx10_43/tests: Add some tests for font object.

Matteo Bruni matteo.mystral at gmail.com
Tue Aug 17 12:18:27 CDT 2021


On Thu, Aug 12, 2021 at 9:26 AM Nikolay Sivov <nsivov at codeweavers.com> wrote:
>
> Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
> ---
>  dlls/d3dx10_43/tests/Makefile.in |   2 +-
>  dlls/d3dx10_43/tests/d3dx10.c    | 931 +++++++++++++++++++++++++++++++
>  2 files changed, 932 insertions(+), 1 deletion(-)

> diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c
> index 30d766bf244..4805f47507a 100644
> --- a/dlls/d3dx10_43/tests/d3dx10.c
> +++ b/dlls/d3dx10_43/tests/d3dx10.c

> +    for (c = 'b'; c <= 'z'; ++c)
> +    {
> +        if (!hdc) break;
> +
> +        count = GetGlyphIndicesA(hdc, &c, 1, &glyph, 0);
> +        ok(count != GDI_ERROR, "Got unexpected count %u.\n", count);
> +
> +        hr = ID3DX10Font_GetGlyphData(font, glyph, &srv, &blackbox, &cellinc);
> +        ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> +
> +        ID3D10ShaderResourceView_GetResource(srv, &resource);
> +        hr = ID3D10Resource_QueryInterface(resource, &IID_ID3D10Texture2D, (void **)&texture);
> +        ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
> +        ID3D10Resource_Release(resource);
> +
> +        ID3D10Texture2D_GetDesc(texture, &texture_desc);
> +        ok(texture_desc.Format == DXGI_FORMAT_R8G8B8A8_UNORM, "Got unexpected format %#x.\n",
> +                texture_desc.Format);
> +        ok(texture_desc.Usage == 0, "Got unexpected usage %#x.\n", texture_desc.Usage);
> +        ok(texture_desc.Width == 256, "Got unexpected width %u.\n", texture_desc.Width);
> +        ok(texture_desc.Height == 256, "Got unexpected height %u.\n", texture_desc.Height);
> +        ok(texture_desc.CPUAccessFlags == 0, "Got unexpected access flags %#x.\n",
> +                texture_desc.CPUAccessFlags);
> +        ok(texture_desc.BindFlags == D3D10_BIND_SHADER_RESOURCE, "Got unexpected bind flags %#x.\n",
> +                texture_desc.BindFlags);

Are there interesting test results WRT the other texture_desc members?



More information about the wine-devel mailing list