[ADVAPI32_APITEST]: Addendum to r72207:

- Fix the tests so that they test what they have to test, on ReactOS & Windows 2k3/XP. (Note that here, ReactOS used the more restrained event size limitations of Vista+ compared to those of Win2k3. I choose to test, and will implement, the size limitations of Win2k3.)
- Choose a different name for the test such that it doesn't collide with the 'eventlog' test from advapi32_winetest.
CORE-11838 CORE-11839

svn path=/trunk/; revision=72209
This commit is contained in:
Hermès Bélusca-Maïto 2016-08-12 13:38:49 +00:00
parent 43728d3f66
commit 0bdab15b0f
2 changed files with 10 additions and 11 deletions

View file

@ -17,7 +17,7 @@ START_TEST(eventlog)
/* Input */
ULONG MaxDataSize;
/* Output for Windows <= 2k3 / Windows Vista+ */
/* Output for Windows <= 2k3 | Windows Vista+ (or "old" ReactOS) */
struct
{
BOOL Success;
@ -39,8 +39,8 @@ START_TEST(eventlog)
{ 0x3FF68, { {TRUE, ERROR_SUCCESS}, {FALSE, RPC_S_INVALID_BOUND} } },
/* Show that the maximum data size for an event can be as big as 0x3FFFF */
{ 0x3FFFE, { {TRUE, ERROR_SUCCESS /* or ERROR_INVALID_PARAMETER on Win2k3 */}, {FALSE, RPC_S_INVALID_BOUND} } },
{ 0x3FFFF, { {TRUE, ERROR_SUCCESS /* or ERROR_INVALID_PARAMETER on Win2k3 */}, {FALSE, RPC_S_INVALID_BOUND} } },
{ 0x3FFFE, { {TRUE, ERROR_SUCCESS /* or FALSE, ERROR_INVALID_PARAMETER on Win2k3 */}, {FALSE, RPC_S_INVALID_BOUND} } },
{ 0x3FFFF, { {TRUE, ERROR_SUCCESS /* or FALSE, ERROR_INVALID_PARAMETER on Win2k3 */}, {FALSE, RPC_S_INVALID_BOUND} } },
{ 0x40000, { {FALSE, RPC_X_BAD_STUB_DATA}, {FALSE, RPC_S_INVALID_BOUND} } },
};
@ -73,13 +73,12 @@ START_TEST(eventlog)
if (LastError == ERROR_ENVVAR_NOT_FOUND)
LastError = ERROR_SUCCESS;
ok((LastError == Tests[i].Result[0].LastError) ||
broken(LastError == ERROR_INVALID_PARAMETER /* For Win2k3, see above */) ||
broken(LastError == Tests[i].Result[1].LastError /* For Vista+ */),
"ReportEventW(%u) last error was %lu, expected %lu\n", i, LastError, Tests[i].Result[0].LastError);
ok((Success == Tests[i].Result[0].Success) || broken(Success == Tests[i].Result[1].Success /* For Vista+ */),
"ReportEventW(%u) returned 0x%x, expected %s\n", i, Success, (Tests[i].Result[0].Success ? "TRUE" : "FALSE"));
ok( ( (Success == Tests[i].Result[0].Success) && (LastError == Tests[i].Result[0].LastError) ) ||
broken( (Success == FALSE) && (LastError == ERROR_INVALID_PARAMETER) /* For Win2k3, see above */) // ||
// broken( (Success == Tests[i].Result[1].Success) && (LastError == Tests[i].Result[1].LastError) /* For Vista+ */)
,
"ReportEventW(%u) returned 0x%x with last error %lu, expected %s with last error %lu\n",
i, Success, LastError, (Tests[i].Result[0].Success ? "TRUE" : "FALSE"), Tests[i].Result[0].LastError);
HeapFree(GetProcessHeap(), 0, Data);
}

View file

@ -19,7 +19,7 @@ const struct test winetest_testlist[] =
{
{ "CreateService", func_CreateService },
{ "DuplicateTokenEx", func_DuplicateTokenEx },
{ "eventlog", func_eventlog },
{ "eventlog_supp", func_eventlog },
{ "HKEY_CLASSES_ROOT", func_HKEY_CLASSES_ROOT },
{ "IsTextUnicode" , func_IsTextUnicode },
{ "LockDatabase" , func_LockDatabase },