Author: hbelusca
Date: Sun Oct 7 14:17:37 2012
New Revision: 57515
URL:
http://svn.reactos.org/svn/reactos?rev=57515&view=rev
Log:
[APITEST:NTDLL]
Add a parameter for displaying the current test number when something fails.
Modified:
trunk/rostests/apitests/ntdll/NtQuerySystemEnvironmentValue.c
Modified: trunk/rostests/apitests/ntdll/NtQuerySystemEnvironmentValue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/NtQuerySys…
==============================================================================
--- trunk/rostests/apitests/ntdll/NtQuerySystemEnvironmentValue.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/ntdll/NtQuerySystemEnvironmentValue.c [iso-8859-1] Sun Oct 7
14:17:37 2012
@@ -49,7 +49,8 @@
{STATUS_SUCCESS , RTL_CONSTANT_STRING(L"LastKnownGood"), TRUE ,
MAX_BUFFER_LENGTH, MIN_BUFFER_LENGTH, MAX_BUFFER_LENGTH},
};
-static void Test_API(IN PTEST_CASE TestCase)
+static void Test_API(IN ULONG TestNumber,
+ IN PTEST_CASE TestCase)
{
NTSTATUS Status = STATUS_SUCCESS;
BOOLEAN WasEnabled = FALSE;
@@ -66,7 +67,7 @@
TRUE,
FALSE,
&WasEnabled);
- ok(NT_SUCCESS(Status), "RtlAdjustPrivilege failed : 0x%08lx\n",
Status);
+ ok(NT_SUCCESS(Status), "RtlAdjustPrivilege(%lu) failed : 0x%08lx\n",
TestNumber, Status);
}
//
@@ -89,12 +90,14 @@
// Now check the results.
//
ok(Status == TestCase->Result,
- "NtQuerySystemEnvironmentValue failed, returned 0x%08lx, expected
0x%08lx\n",
+ "NtQuerySystemEnvironmentValue(%lu) failed : returned 0x%08lx, expected
0x%08lx\n",
+ TestNumber,
Status,
TestCase->Result);
ok( ((TestCase->MinimalExpectedReturnedLength <= ReturnedLength) &&
(ReturnedLength <= TestCase->MaximalExpectedReturnedLength)),
- "Returned length %lu, expected between %lu and %lu\n",
+ "NtQuerySystemEnvironmentValue(%lu) failed : returned length %lu, expected
between %lu and %lu\n",
+ TestNumber,
ReturnedLength,
TestCase->MinimalExpectedReturnedLength,
TestCase->MaximalExpectedReturnedLength);
@@ -106,7 +109,7 @@
for (i = 0 ; i < COUNT_OF(TestCases) ; ++i)
{
- Test_API(&TestCases[i]);
+ Test_API(i, &TestCases[i]);
}
}