[KMTESTS]

- add START_TEST macro in case test functions ever have to be passed an argument
- add a few ok_* convenience macros
- remove unnecessary C library function renaming macros

svn path=/branches/GSoC_2011/KMTestSuite/; revision=52371
This commit is contained in:
Thomas Faber 2011-06-19 18:27:14 +00:00
parent ba63f36790
commit 7d4da25d6e
2 changed files with 36 additions and 10 deletions

View file

@ -8,7 +8,7 @@
#include <ntddk.h>
#include <kmt_test.h>
VOID Test_Example(VOID)
START_TEST(Example)
{
KIRQL Irql;
@ -17,5 +17,18 @@ VOID Test_Example(VOID)
trace("Message from kernel, low-irql. %s. %ls.\n", "Format strings work", L"Even with Unicode");
KeRaiseIrql(HIGH_LEVEL, &Irql);
trace("Message from kernel, high-irql. %s. %ls.\n", "Format strings work", L"Even with Unicode");
ok_irql(DISPATCH_LEVEL);
ok_eq_int(5, 6);
ok_eq_uint(6U, 7U);
ok_eq_long(1L, 2L);
ok_eq_ulong(3LU, 4LU);
ok_eq_pointer((PVOID)8, (PVOID)9);
ok_eq_hex(0x1234LU, 0x5678LU);
ok_bool_true(FALSE, "foo");
ok_bool_false(TRUE, "bar");
ok_eq_print(1, 2, "%i");
ok_eq_str("Hello", "world");
ok_eq_wstr(L"ABC", L"DEF");
KeLowerIrql(Irql);
}