ReactOS  0.4.14-dev-98-gb0d4763
Example.c File Reference
#include <kmt_test.h>
Include dependency graph for Example.c:

Go to the source code of this file.

Functions

 START_TEST (Example)
 

Function Documentation

◆ START_TEST()

START_TEST ( Example  )

Definition at line 10 of file Example.c.

11 {
12  KIRQL Irql;
13 
14  ok(1, "This test should succeed.\n");
15  ok(0, "This test should fail.\n");
16  trace("Message from kernel, low-irql. %s. %ls.\n", "Format strings work", L"Even with Unicode");
18  trace("Message from kernel, high-irql. %s. %ls.\n", "Format strings work", L"Even with Unicode");
19 
20  ok_irql(DISPATCH_LEVEL);
21  ok_eq_int(5, 6);
22  ok_eq_uint(6U, 7U);
23  ok_eq_long(1L, 2L);
24  ok_eq_ulong(3LU, 4LU);
25  ok_eq_pointer((PVOID)8, (PVOID)9);
26  ok_eq_hex(0x1234LU, 0x5678LU);
30  ok_bool_true(FALSE, "foo");
31  ok_bool_false(TRUE, "bar");
32  ok_eq_print(1, 2, "%i");
33  ok_eq_str("Hello", "world");
34  ok_eq_wstr(L"ABC", L"DEF");
35 
36  if (!skip(KeGetCurrentIrql() == HIGH_LEVEL, "This should only work on HIGH_LEVEL\n"))
37  {
38  /* do tests depending on HIGH_LEVEL here */
39  ok(1, "This is fine\n");
40  }
41 
43 }
#define ok_eq_print(value, expected, spec)
Definition: kmt_test.h:236
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
#define ok_eq_ulong(value, expected)
#define KeRaiseIrql(irql, oldIrql)
Definition: env_spec_w32.h:597
#define TRUE
Definition: types.h:120
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602
#define ok_eq_wstr(value, expected)
Definition: kmt_test.h:262
#define ok_eq_int(value, expected)
Definition: kmt_test.h:238
#define ok_eq_pointer(value, expected)
#define U(x)
Definition: wordpad.c:44
_Out_ PKIRQL Irql
Definition: csq.h:179
#define ok_bool_false(value, desc)
Definition: kmt_test.h:257
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define ok_bool_true(value, desc)
Definition: kmt_test.h:256
#define ok_eq_bool(value, expected)
Definition: kmt_test.h:258
#define trace
Definition: atltest.h:70
#define ok_eq_str(value, expected)
Definition: kmt_test.h:261
static const WCHAR L[]
Definition: oid.c:1250
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
#define HIGH_LEVEL
Definition: env_spec_w32.h:703
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define ok_eq_hex(value, expected)
#define ok_eq_uint(value, expected)
Definition: kmt_test.h:239
#define ok_eq_long(value, expected)
Definition: kmt_test.h:240