kernel32/tests: Add a test to show that VirtualFree fails with type MEM_FREE.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2016-02-13 22:24:30 +01:00 committed by Alexandre Julliard
parent 1bebee9c1b
commit 24641d8e44
1 changed files with 5 additions and 0 deletions

View File

@ -369,6 +369,11 @@ static void test_VirtualAlloc(void)
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"got %d, expected ERROR_INVALID_PARAMETER\n", GetLastError());
SetLastError(0xdeadbeef);
ok(!VirtualFree(addr1, 0, MEM_FREE), "VirtualFree should fail with type MEM_FREE\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"got %d, expected ERROR_INVALID_PARAMETER\n", GetLastError());
ok(VirtualFree(addr1, 0x10000, MEM_DECOMMIT), "VirtualFree failed\n");
/* if the type is MEM_RELEASE, size must be 0 */