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

Alexandre Julliard julliard at wine.codeweavers.com
Mon Feb 15 09:41:49 CST 2016


Module: wine
Branch: master
Commit: 24641d8e44b3816709436b360d18f81164b8ff26
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=24641d8e44b3816709436b360d18f81164b8ff26

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Sat Feb 13 22:24:30 2016 +0100

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

Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/tests/virtual.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c
index e614bde..f47a54c 100644
--- a/dlls/kernel32/tests/virtual.c
+++ b/dlls/kernel32/tests/virtual.c
@@ -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 */




More information about the wine-cvs mailing list