[PATCH v2 3/8] d3dx9/tests: Add some more ID3DXFont tests.
Sven Baars
sbaars at codeweavers.com
Mon Jan 27 04:46:41 CST 2020
On 22-01-2020 17:07, Matteo Bruni wrote:
> On Mon, Jan 6, 2020 at 3:35 PM Sven Baars <sbaars at codeweavers.com> wrote:
>> hr = IDirect3DTexture9_GetLevelDesc(texture, 0, &desc);
>> ok(hr == D3D_OK, "IDirect3DTexture9_GetLevelDesc failed\n");
>> - ok(desc.Format == D3DFMT_A8R8G8B8, "Got format %#x, expected %#x\n", desc.Format, D3DFMT_A8R8G8B8);
>> - ok(desc.Usage == 0, "Got usage %#x, expected %#x\n", desc.Usage, 0);
>> - ok(desc.Width == 256, "Got width %u, expected %u\n", desc.Width, 256);
>> - ok(desc.Height == 256, "Got height %u, expected %u\n", desc.Height, 256);
>> - ok(desc.Pool == D3DPOOL_MANAGED, "Got pool %u, expected %u\n", desc.Pool, D3DPOOL_MANAGED);
>> + ok(desc.Format == D3DFMT_A8R8G8B8, "Character %c, got format %#x, expected %#x\n", c, desc.Format, D3DFMT_A8R8G8B8);
>> + ok(desc.Usage == 0, "Character %c, got usage %#x, expected %#x\n", c, desc.Usage, 0);
>> + ok(desc.Width == 256, "Character %c, got width %u, expected %u\n", c, desc.Width, 256);
>> + ok(desc.Height == 256, "Character %c, got height %u, expected %u\n", c, desc.Height, 256);
>> + ok(desc.Pool == D3DPOOL_MANAGED, "Character %c, got pool %u, expected %u\n", c, desc.Pool, D3DPOOL_MANAGED);
>> +
>> + /* Check blackbox and cellinc, but skip v, w and y, because these
>> + are apparently smaller */
>> + ret = GetGlyphOutlineW(hdc, glyph, GGO_GLYPH_INDEX | GGO_GRAY8_BITMAP | GGO_METRICS, &metrics, 0, NULL, &mat);
>> + if (ret != GDI_ERROR && c != 'v' && c != 'w' && c != 'y') {
>
> Smaller how exactly? Anyway, I don't like this kind of special casing;
> I'd rather allow some tolerance in the checks below.
> Hi Matteo,
Thanks for the review.
If I introduce a tolerance here, the Wine tests also start succeeding,
which is not what I want, since I want to show that my implementation is
not entirely correct. I'm unsure how else the glyphs could be created
though, so I'm not sure how this could be tested/implemented differently.
Cheers,
Sven
More information about the wine-devel
mailing list