reactos/rostests/drivers/kmtest/kmtest.h
Michael Martin 75946e1764 - FinishTest: Modify DbgPrint to match format of winetests.
- Added basic tests for DriverObject, DeviceObject and Loading/Unloading of drivers.
- Added kmtestassist to be used for testing Attached DeviceObject.
- Added CreateLowerDeviceRegistryKey to manually create volatile registry entry for kmtestassist driver.
- More tests still need to be implemented and still need a user mode application to control kmtest.

svn path=/trunk/; revision=41381
2009-06-11 14:13:11 +00:00

54 lines
1.5 KiB
C

#ifndef PNPTEST_H
#define PNPTEST_H
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include "ntddk.h"
/*
Some macros, structs, and vars are based or inspired from the great
Wine regression tests Copyright (C) 2002 Alexandre Julliard.
Everything else is done by Aleksey Bragin based on PnPTest by Filip Navara
*/
extern LONG successes; /* number of successful tests */
extern LONG failures; /* number of failures */
//static ULONG todo_successes; /* number of successful tests inside todo block */
//static ULONG todo_failures; /* number of failures inside todo block */
// We don't do multithreading, so we just keep this struct in a global var
typedef struct
{
const char* current_file; /* file of current check */
int current_line; /* line of current check */
int todo_level; /* current todo nesting level */
int todo_do_loop;
} tls_data;
extern tls_data glob_data;
VOID StartTest();
VOID FinishTest(LPSTR TestName);
void kmtest_set_location(const char* file, int line);
#ifdef __GNUC__
extern int kmtest_ok( int condition, const char *msg, ... ) __attribute__((format (printf,2,3) ));
#else /* __GNUC__ */
extern int kmtest_ok( int condition, const char *msg, ... );
#endif /* __GNUC__ */
#define ok_(file, line) (kmtest_set_location(file, line), 0) ? 0 : kmtest_ok
#define ok ok_(__FILE__, __LINE__)
PDEVICE_OBJECT AttachDeviceObject;
PDEVICE_OBJECT MainDeviceObject;
PDRIVER_OBJECT ThisDriverObject;
#endif /* PNPTEST_H */