mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 20:18:22 +00:00
[w32knapi}
Patch by Jerome Gardou: add some more tests for NtGdiDeleteObjectApp svn path=/trunk/; revision=47130
This commit is contained in:
parent
e03efb63b2
commit
2545e83084
2 changed files with 23 additions and 1 deletions
|
@ -24,6 +24,8 @@ Test_NtGdiCreateCompatibleDC(PTESTINFO pti)
|
|||
|
||||
TEST(NtGdiDeleteObjectApp(hDC) != 0);
|
||||
|
||||
TEST(NtGdiDeleteObjectApp(hDC) != 0);
|
||||
|
||||
return APISTATUS_NORMAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,26 @@ Test_NtGdiDeleteObjectApp(PTESTINFO pti)
|
|||
TEST(SelectObject(hdc, GetStockObject(WHITE_PEN)) == NULL);
|
||||
TESTX(GetLastError() == ERROR_INVALID_PARAMETER, "GetLasterror returned 0x%08x\n", (unsigned int)GetLastError());
|
||||
|
||||
/* Delete a display DC */
|
||||
SetLastError(0);
|
||||
hdc = CreateDC("DISPLAY", NULL, NULL, NULL);
|
||||
ASSERT(IsHandleValid(hdc) == 1);
|
||||
TEST(NtGdiDeleteObjectApp(hdc) != 0);
|
||||
TEST(GetLastError() == 0);
|
||||
TEST(IsHandleValid(hdc) == 1);
|
||||
TEST(SelectObject(hdc, GetStockObject(WHITE_PEN)) == NULL);
|
||||
TESTX(GetLastError() == ERROR_INVALID_PARAMETER, "GetLasterror returned 0x%08x\n", (unsigned int)GetLastError());
|
||||
|
||||
/* Once more */
|
||||
SetLastError(0);
|
||||
hdc = GetDC(0);
|
||||
ASSERT(IsHandleValid(hdc) == 1);
|
||||
TEST(NtGdiDeleteObjectApp(hdc) != 0);
|
||||
TEST(GetLastError() == 0);
|
||||
TEST(IsHandleValid(hdc) == 1);
|
||||
TEST(SelectObject(hdc, GetStockObject(WHITE_PEN)) == NULL);
|
||||
TESTX(GetLastError() == ERROR_INVALID_PARAMETER, "GetLasterror returned 0x%08x\n", (unsigned int)GetLastError());
|
||||
|
||||
/* Delete a brush */
|
||||
SetLastError(0);
|
||||
hbrush = CreateSolidBrush(0x123456);
|
||||
|
|
Loading…
Reference in a new issue