[W32KNAPI]

Add few more tests for NtGdiCreateBitmap

svn path=/trunk/; revision=47550
This commit is contained in:
Timo Kreuzer 2010-06-03 19:39:28 +00:00
parent 4e381837a0
commit 859c81ee74

View file

@ -36,16 +36,31 @@ Test_NtGdiCreateBitmap_Params(PTESTINFO pti)
TEST(NtGdiCreateBitmap(1, -2, 1, 1, NULL) == NULL);
TEST(GetLastError() == ERROR_INVALID_PARAMETER);
/* Test negative cy */
/* Test negative cy and valid bits */
SetLastError(ERROR_SUCCESS);
TEST(NtGdiCreateBitmap(1, -2, 1, 1, BitmapData) == NULL);
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 */
SetLastError(ERROR_SUCCESS);
TEST(NtGdiCreateBitmap(100000, 100000, 1, 1, NULL) == NULL);
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 */
SetLastError(ERROR_SUCCESS);
TEST((hBmp = NtGdiCreateBitmap(1, 1, 0, 1, NULL)) != NULL);