Author: hbelusca Date: Fri Aug 12 13:38:49 2016 New Revision: 72209
URL: http://svn.reactos.org/svn/reactos?rev=72209&view=rev Log: [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
Modified: trunk/rostests/apitests/advapi32/eventlog.c trunk/rostests/apitests/advapi32/testlist.c
Modified: trunk/rostests/apitests/advapi32/eventlog.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/advapi32/eventlog... ============================================================================== --- trunk/rostests/apitests/advapi32/eventlog.c [iso-8859-1] (original) +++ trunk/rostests/apitests/advapi32/eventlog.c [iso-8859-1] Fri Aug 12 13:38:49 2016 @@ -17,7 +17,7 @@ /* 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 @@ { 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 @@ 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); }
Modified: trunk/rostests/apitests/advapi32/testlist.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/advapi32/testlist... ============================================================================== --- trunk/rostests/apitests/advapi32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/advapi32/testlist.c [iso-8859-1] Fri Aug 12 13:38:49 2016 @@ -19,7 +19,7 @@ { { "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 },