ReactOS  0.4.15-dev-494-g1d8c567
kmt_test_user.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS kernel-mode tests
3  * LICENSE: LGPL-2.1+ (https://spdx.org/licenses/LGPL-2.1+)
4  * PURPOSE: Kernel-Mode Test Suite test framework user declarations
5  * COPYRIGHT: Copyright 2011-2018 Thomas Faber <thomas.faber@reactos.org>
6  */
7 
8 #ifndef _KMTEST_TEST_USER_H_
9 #define _KMTEST_TEST_USER_H_
10 
11 #if !defined _KMTEST_TEST_H_
12 #error include kmt_test.h instead of including kmt_test_user.h
13 #endif /* !defined _KMTEST_TEST_H_ */
14 
16 {
17  PKMT_RESULTBUFFER Buffer = HeapAlloc(GetProcessHeap(), 0, ResultBufferSize);
18  if (!Buffer)
19  return NULL;
20 
21  Buffer->Successes = 0;
22  Buffer->Failures = 0;
23  Buffer->Skipped = 0;
24  Buffer->LogBufferLength = 0;
25  Buffer->LogBufferMaxLength = (ULONG)ResultBufferSize - FIELD_OFFSET(KMT_RESULTBUFFER, LogBuffer);
26 
27  return Buffer;
28 }
29 
31 {
33 }
34 
35 #define KmtVSNPrintF vsnprintf
36 
37 #endif /* !defined _KMTEST_TEST_USER_H_ */
static VOID KmtFreeResultBuffer(PKMT_RESULTBUFFER Buffer)
Definition: kmt_test_user.h:30
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
#define GetProcessHeap()
Definition: compat.h:404
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
ULONG_PTR SIZE_T
Definition: typedefs.h:79
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
static PKMT_RESULTBUFFER KmtAllocateResultBuffer(SIZE_T ResultBufferSize)
Definition: kmt_test_user.h:15
unsigned int ULONG
Definition: retypes.h:1
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
#define HeapFree(x, y, z)
Definition: compat.h:403