On Di, 2007-04-03 at 23:40 +0900, Dmitry Timoshkov wrote:
> Changelog:
> winspool: Add a test for DeviceCapabilities, fix some bugs found.
> + hComdlg32 = LoadLibrary("comdlg32.dll");
> + assert(hComdlg32);
> + pPrintDlg = GetProcAddress(hComdlg32, "PrintDlgA");
> + assert(pPrintDlg);
Why are you using assert() and kill the test?
Is skip not enough?
> + ok(dm != NULL, "GlobalLock(prn_dlg.hDevMode) failed\n");
> + trace("dmDeviceName \"%s\"\n", dm->dmDeviceName);
You added a ok() for "dm =! NULL", but "dm" is accessed always and will
crash the test.
> + ok(dn != NULL, "GlobalLock(prn_dlg.hDevNames) failed\n");
> + ok(dn->wDriverOffset, "expected not 0 wDriverOffset\n");
Same here for "dn".
> + ok(lstrcmp((const char *)dm->dmDeviceName, (const char *)dn + dn->wDeviceOffset) == 0, "device names not match\n");
You introduced the same bug, as you did in in your previous Patch!
(test_DocumentProperties)
dm->dmDeviceName is limited to CCHDEVICENAME
> + trace("fields %x\n", fields);
> +todo_wine
> + ok(fields == dm->dmFields, "fields %x != dmFields %x\n", fields, dm->dmFields);
info.c:2093:fields 7b13
info.c:2095: Test succeeded inside todo block: fields 7b13 != dmFields
7b13
I get the same "succeeded inside todo" for all printers
> test_SetDefaultPrinter();
> test_XcvDataW_MonitorUI();
> test_XcvDataW_PortIsValid();
> + test_DeviceCapabilities();
>
Why is it so difficult to add the tests in alphabetic order?
This Patch dump a lot of unneeded data.
Please remove the traces (or dump the data only in interactive mode).
Thanks
--
By by ... Detlef