comdlg32/tests: More tests for the member lStructSize

Detlef Riekenberg wine.dev at web.de
Fri Aug 10 00:19:42 CDT 2007


Changelog:
- comdlg32/tests: More tests for the member lStructSize


Depends on:
comdlg32-tests-Add-simple-tests-for-PrintDlgA

-- 
 
By by ... Detlef

-------------- next part --------------
>From 67d299f023978b2198f3646a9c85e4cdb4060842 Mon Sep 17 00:00:00 2001
From: Detlef Riekenberg <wine.dev at web.de>
Date: Fri, 10 Aug 2007 07:12:04 +0200
Subject: [PATCH] comdlg/tests: More tests for the member lStructSize
---
 dlls/comdlg32/tests/printdlg.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/dlls/comdlg32/tests/printdlg.c b/dlls/comdlg32/tests/printdlg.c
index 27b0390..80685ee 100644
--- a/dlls/comdlg32/tests/printdlg.c
+++ b/dlls/comdlg32/tests/printdlg.c
@@ -58,6 +58,15 @@ static void test_PageSetupDlgA(void)
         "returned %u with %u and 0x%x (expected '0' and "
         "CDERR_STRUCTSIZE)\n", res, GetLastError(), CommDlgExtendedError());
 
+    ZeroMemory(pDlg, sizeof(PAGESETUPDLGA));
+    pDlg->lStructSize = sizeof(PAGESETUPDLGA) +1;
+    pDlg->Flags = PSD_RETURNDEFAULT;
+    SetLastError(0xdeadbeef);
+    res = PageSetupDlgA(pDlg);
+    ok( !res && (CommDlgExtendedError() == CDERR_STRUCTSIZE),
+        "returned %u with %u and 0x%x (expected '0' and CDERR_STRUCTSIZE)\n", 
+        res, GetLastError(), CommDlgExtendedError());
+
 
     ZeroMemory(pDlg, sizeof(PAGESETUPDLGA));
     pDlg->lStructSize = sizeof(PAGESETUPDLGA);
@@ -106,6 +115,15 @@ static void test_PrintDlgA(void)
         "returned %d with 0x%x and 0x%x (expected '0' and "
         "CDERR_STRUCTSIZE)\n", res, GetLastError(), CommDlgExtendedError());
 
+    ZeroMemory(pDlg, sizeof(PRINTDLGA));
+    pDlg->lStructSize = sizeof(PRINTDLGA) + 1;
+    pDlg->Flags = PD_RETURNDEFAULT;
+    SetLastError(0xdeadbeef);
+    res = PrintDlgA(pDlg);
+    ok( !res && (CommDlgExtendedError() == CDERR_STRUCTSIZE),
+        "returned %u with %u and 0x%x (expected '0' and "
+        "CDERR_STRUCTSIZE)\n", res, GetLastError(), CommDlgExtendedError());
+
 
     ZeroMemory(pDlg, sizeof(PRINTDLGA));
     pDlg->lStructSize = sizeof(PRINTDLGA);
-- 
1.4.1



More information about the wine-patches mailing list