ReactOS 0.4.16-dev-197-g92996da
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_ */
Definition: bufpool.h:45
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
static VOID KmtFreeResultBuffer(PKMT_RESULTBUFFER Buffer)
Definition: kmt_test_user.h:30
static PKMT_RESULTBUFFER KmtAllocateResultBuffer(SIZE_T ResultBufferSize)
Definition: kmt_test_user.h:15
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG
Definition: typedefs.h:59