mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 12:14:32 +00:00
[W32KNAPI]
Add few more tests for NtGdiCreateBitmap svn path=/trunk/; revision=47550
This commit is contained in:
parent
4e381837a0
commit
859c81ee74
1 changed files with 16 additions and 1 deletions
|
@ -36,16 +36,31 @@ Test_NtGdiCreateBitmap_Params(PTESTINFO pti)
|
||||||
TEST(NtGdiCreateBitmap(1, -2, 1, 1, NULL) == NULL);
|
TEST(NtGdiCreateBitmap(1, -2, 1, 1, NULL) == NULL);
|
||||||
TEST(GetLastError() == ERROR_INVALID_PARAMETER);
|
TEST(GetLastError() == ERROR_INVALID_PARAMETER);
|
||||||
|
|
||||||
/* Test negative cy */
|
/* Test negative cy and valid bits */
|
||||||
SetLastError(ERROR_SUCCESS);
|
SetLastError(ERROR_SUCCESS);
|
||||||
TEST(NtGdiCreateBitmap(1, -2, 1, 1, BitmapData) == NULL);
|
TEST(NtGdiCreateBitmap(1, -2, 1, 1, BitmapData) == NULL);
|
||||||
TEST(GetLastError() == ERROR_SUCCESS);
|
TEST(GetLastError() == ERROR_SUCCESS);
|
||||||
|
|
||||||
|
/* Test negative cy and invalid bits */
|
||||||
|
SetLastError(ERROR_SUCCESS);
|
||||||
|
TEST(NtGdiCreateBitmap(1, -2, 1, 1, (BYTE*)0x80001234) == NULL);
|
||||||
|
TEST(GetLastError() == ERROR_SUCCESS);
|
||||||
|
|
||||||
/* Test huge size */
|
/* Test huge size */
|
||||||
SetLastError(ERROR_SUCCESS);
|
SetLastError(ERROR_SUCCESS);
|
||||||
TEST(NtGdiCreateBitmap(100000, 100000, 1, 1, NULL) == NULL);
|
TEST(NtGdiCreateBitmap(100000, 100000, 1, 1, NULL) == NULL);
|
||||||
TEST(GetLastError() == ERROR_NOT_ENOUGH_MEMORY);
|
TEST(GetLastError() == ERROR_NOT_ENOUGH_MEMORY);
|
||||||
|
|
||||||
|
/* Test huge size and valid bits */
|
||||||
|
SetLastError(ERROR_SUCCESS);
|
||||||
|
TEST(NtGdiCreateBitmap(1000, 1000, 1, 1, BitmapData) == NULL);
|
||||||
|
TEST(GetLastError() == ERROR_SUCCESS);
|
||||||
|
|
||||||
|
/* Test huge size and invalid bits */
|
||||||
|
SetLastError(ERROR_SUCCESS);
|
||||||
|
TEST(NtGdiCreateBitmap(100000, 100000, 1, 1, (BYTE*)0x80001234) == NULL);
|
||||||
|
TEST(GetLastError() == ERROR_SUCCESS);
|
||||||
|
|
||||||
/* Test cPlanes == 0 */
|
/* Test cPlanes == 0 */
|
||||||
SetLastError(ERROR_SUCCESS);
|
SetLastError(ERROR_SUCCESS);
|
||||||
TEST((hBmp = NtGdiCreateBitmap(1, 1, 0, 1, NULL)) != NULL);
|
TEST((hBmp = NtGdiCreateBitmap(1, 1, 0, 1, NULL)) != NULL);
|
||||||
|
|
Loading…
Reference in a new issue