Commit 30ee1d10 authored by Alexandre Julliard's avatar Alexandre Julliard

winspool.drv/tests: Use nameless unions/structs.

parent e7e43b45
......@@ -21,9 +21,6 @@
#include <stdarg.h>
#include <assert.h>
#define NONAMELESSSTRUCT
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
......@@ -2934,7 +2931,7 @@ static void test_OpenPrinter_defaults(void)
pi = HeapAlloc( GetProcessHeap(), 0, needed );
ret = GetPrinterA( printer, 2, (BYTE *)pi, needed, &needed );
ok( ret, "GetPrinterA() failed le=%ld\n", GetLastError() );
default_size = pi->pDevMode->u1.s1.dmPaperSize;
default_size = pi->pDevMode->dmPaperSize;
HeapFree( GetProcessHeap(), 0, pi );
needed = 0;
......@@ -2962,8 +2959,8 @@ static void test_OpenPrinter_defaults(void)
todo_wine
ok( job_info->pDevMode != NULL, "got NULL DEVMODEA\n");
if (job_info->pDevMode)
ok( job_info->pDevMode->u1.s1.dmPaperSize == default_size, "got %d default %d\n",
job_info->pDevMode->u1.s1.dmPaperSize, default_size );
ok( job_info->pDevMode->dmPaperSize == default_size, "got %d default %d\n",
job_info->pDevMode->dmPaperSize, default_size );
HeapFree( GetProcessHeap(), 0, job_info );
ScheduleJob( printer, add_job->JobId ); /* remove the empty job */
......@@ -2975,7 +2972,7 @@ static void test_OpenPrinter_defaults(void)
memset( &my_dm, 0, sizeof(my_dm) );
my_dm.dmSize = sizeof(my_dm);
my_dm.dmFields = DM_PAPERSIZE;
my_dm.u1.s1.dmPaperSize = (default_size == DMPAPER_A4) ? DMPAPER_LETTER : DMPAPER_A4;
my_dm.dmPaperSize = (default_size == DMPAPER_A4) ? DMPAPER_LETTER : DMPAPER_A4;
prn_def.pDatatype = NULL;
prn_def.pDevMode = &my_dm;
......@@ -2990,8 +2987,8 @@ static void test_OpenPrinter_defaults(void)
pi = HeapAlloc( GetProcessHeap(), 0, needed );
ret = GetPrinterA( printer, 2, (BYTE *)pi, needed, &needed );
ok( ret, "GetPrinterA() failed le=%ld\n", GetLastError() );
ok( pi->pDevMode->u1.s1.dmPaperSize == default_size, "got %d default %d\n",
pi->pDevMode->u1.s1.dmPaperSize, default_size );
ok( pi->pDevMode->dmPaperSize == default_size, "got %d default %d\n",
pi->pDevMode->dmPaperSize, default_size );
HeapFree( GetProcessHeap(), 0, pi );
......@@ -3010,9 +3007,9 @@ static void test_OpenPrinter_defaults(void)
ok( job_info->pDevMode->dmFields == DM_PAPERSIZE, "got %08lx\n",
job_info->pDevMode->dmFields );
ok( job_info->pDevMode->u1.s1.dmPaperSize == my_dm.u1.s1.dmPaperSize,
ok( job_info->pDevMode->dmPaperSize == my_dm.dmPaperSize,
"got %d new size %d\n",
job_info->pDevMode->u1.s1.dmPaperSize, my_dm.u1.s1.dmPaperSize );
job_info->pDevMode->dmPaperSize, my_dm.dmPaperSize );
HeapFree( GetProcessHeap(), 0, job_info );
ScheduleJob( printer, add_job->JobId ); /* remove the empty job */
......@@ -3035,15 +3032,15 @@ static void test_IsValidDevmodeW(void)
{ 0, FIELD_OFFSET(DEVMODEW, dmFields) + 3, FALSE },
{ 0, FIELD_OFFSET(DEVMODEW, dmFields) + 4, TRUE },
{ DM_ORIENTATION, FIELD_OFFSET(DEVMODEW, u1.s1.dmOrientation) + 0, FALSE },
{ DM_ORIENTATION, FIELD_OFFSET(DEVMODEW, u1.s1.dmOrientation) + 1, FALSE },
{ DM_ORIENTATION, FIELD_OFFSET(DEVMODEW, u1.s1.dmOrientation) + 2, TRUE },
{ DM_ORIENTATION, FIELD_OFFSET(DEVMODEW, dmOrientation) + 0, FALSE },
{ DM_ORIENTATION, FIELD_OFFSET(DEVMODEW, dmOrientation) + 1, FALSE },
{ DM_ORIENTATION, FIELD_OFFSET(DEVMODEW, dmOrientation) + 2, TRUE },
{ DM_NUP, FIELD_OFFSET(DEVMODEW, u2.dmNup) + 0, FALSE },
{ DM_NUP, FIELD_OFFSET(DEVMODEW, u2.dmNup) + 1, FALSE },
{ DM_NUP, FIELD_OFFSET(DEVMODEW, u2.dmNup) + 2, FALSE },
{ DM_NUP, FIELD_OFFSET(DEVMODEW, u2.dmNup) + 3, FALSE },
{ DM_NUP, FIELD_OFFSET(DEVMODEW, u2.dmNup) + 4, TRUE },
{ DM_NUP, FIELD_OFFSET(DEVMODEW, dmNup) + 0, FALSE },
{ DM_NUP, FIELD_OFFSET(DEVMODEW, dmNup) + 1, FALSE },
{ DM_NUP, FIELD_OFFSET(DEVMODEW, dmNup) + 2, FALSE },
{ DM_NUP, FIELD_OFFSET(DEVMODEW, dmNup) + 3, FALSE },
{ DM_NUP, FIELD_OFFSET(DEVMODEW, dmNup) + 4, TRUE },
};
static const struct
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment