mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:13:06 +00:00
[GDI32_APITEST:GetTextFace] Replace tabs by spaces.
This commit is contained in:
parent
c74696c06d
commit
9a11551a56
1 changed files with 15 additions and 15 deletions
|
@ -28,59 +28,59 @@ void Test_GetTextFace(void)
|
||||||
ok(hDC != 0, "CreateCompatibleDC failed, skipping tests.\n");
|
ok(hDC != 0, "CreateCompatibleDC failed, skipping tests.\n");
|
||||||
if (!hDC) return;
|
if (!hDC) return;
|
||||||
|
|
||||||
/* Whether asking for the string size (NULL buffer) ignores the size argument */
|
/* Whether asking for the string size (NULL buffer) ignores the size argument */
|
||||||
SetLastError(0xE000BEEF);
|
SetLastError(0xE000BEEF);
|
||||||
ret = GetTextFaceW(hDC, 0, NULL);
|
ret = GetTextFaceW(hDC, 0, NULL);
|
||||||
TEST(ret != 0);
|
TEST(ret != 0);
|
||||||
ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError());
|
ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError());
|
||||||
ret2 = ret;
|
ret2 = ret;
|
||||||
|
|
||||||
SetLastError(0xE000BEEF);
|
SetLastError(0xE000BEEF);
|
||||||
ret = GetTextFaceW(hDC, -1, NULL);
|
ret = GetTextFaceW(hDC, -1, NULL);
|
||||||
TEST(ret != 0);
|
TEST(ret != 0);
|
||||||
TEST(ret == ret2);
|
TEST(ret == ret2);
|
||||||
ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError());
|
ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError());
|
||||||
ret2 = ret;
|
ret2 = ret;
|
||||||
|
|
||||||
SetLastError(0xE000BEEF);
|
SetLastError(0xE000BEEF);
|
||||||
ret = GetTextFaceW(hDC, 10000, NULL);
|
ret = GetTextFaceW(hDC, 10000, NULL);
|
||||||
TEST(ret != 0);
|
TEST(ret != 0);
|
||||||
TEST(ret == ret2);
|
TEST(ret == ret2);
|
||||||
ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError());
|
ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError());
|
||||||
ret2 = ret;
|
ret2 = ret;
|
||||||
|
|
||||||
/* Whether the buffer is correctly filled */
|
/* Whether the buffer is correctly filled */
|
||||||
SetLastError(0xE000BEEF);
|
SetLastError(0xE000BEEF);
|
||||||
ret = GetTextFaceW(hDC, 20, Buffer);
|
ret = GetTextFaceW(hDC, 20, Buffer);
|
||||||
TEST(ret != 0);
|
TEST(ret != 0);
|
||||||
TEST(ret <= 20);
|
TEST(ret <= 20);
|
||||||
TEST(Buffer[ret - 1] == 0);
|
TEST(Buffer[ret - 1] == 0);
|
||||||
ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError());
|
ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError());
|
||||||
|
|
||||||
SetLastError(0xE000BEEF);
|
SetLastError(0xE000BEEF);
|
||||||
ret = GetTextFaceW(hDC, 1, Buffer);
|
ret = GetTextFaceW(hDC, 1, Buffer);
|
||||||
TEST(ret == 1);
|
TEST(ret == 1);
|
||||||
TEST(Buffer[ret - 1] == 0);
|
TEST(Buffer[ret - 1] == 0);
|
||||||
ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError());
|
ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError());
|
||||||
|
|
||||||
SetLastError(0xE000BEEF);
|
SetLastError(0xE000BEEF);
|
||||||
ret = GetTextFaceW(hDC, 2, Buffer);
|
ret = GetTextFaceW(hDC, 2, Buffer);
|
||||||
TEST(ret == 2);
|
TEST(ret == 2);
|
||||||
TEST(Buffer[ret - 1] == 0);
|
TEST(Buffer[ret - 1] == 0);
|
||||||
ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError());
|
ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError());
|
||||||
|
|
||||||
/* Whether invalid buffer sizes are correctly ignored */
|
/* Whether invalid buffer sizes are correctly ignored */
|
||||||
SetLastError(0xE000BEEF);
|
SetLastError(0xE000BEEF);
|
||||||
ret = GetTextFaceW(hDC, 0, Buffer);
|
ret = GetTextFaceW(hDC, 0, Buffer);
|
||||||
TEST(ret == 0);
|
TEST(ret == 0);
|
||||||
ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() == %ld\n", GetLastError());
|
ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() == %ld\n", GetLastError());
|
||||||
|
|
||||||
SetLastError(0xE000BEEF);
|
SetLastError(0xE000BEEF);
|
||||||
ret = GetTextFaceW(hDC, -1, Buffer);
|
ret = GetTextFaceW(hDC, -1, Buffer);
|
||||||
TEST(ret == 0);
|
TEST(ret == 0);
|
||||||
ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() == %ld\n", GetLastError());
|
ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() == %ld\n", GetLastError());
|
||||||
|
|
||||||
DeleteDC(hDC);
|
DeleteDC(hDC);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Test_GetTextFaceAliasW(void)
|
void Test_GetTextFaceAliasW(void)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue