ARB
Classes | Macros | Typedefs | Enumerations | Functions | Variables
UnitTester.hxx File Reference
#include <cstdlib>
#include <cstdio>
Include dependency graph for UnitTester.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  UnitTest_simple
 
struct  UnitTester
 

Macros

#define FLAGS_DIR   "flags"
 
#define FLAGS_EXT   "flag"
 

Typedefs

typedef void(* UnitTest_function )()
 

Enumerations

enum  UnitTestResult {
  TEST_OK, TEST_TRAPPED, TEST_FAILED_POSTCONDITION, TEST_INTERRUPTED,
  TEST_THREW, TEST_INVALID, TEST_UNKNOWN_RESULT
}
 

Functions

UnitTestResult execute_guarded (UnitTest_function fun, long *duration_usec, long max_allowed_duration_ms, bool detect_environment_calls)
 
void sleepms (long ms)
 

Variables

const long SECONDS = 1000
 
const long MINUTES = 60*SECONDS
 
const long MAX_EXEC_MS_NORMAL = 30 * MINUTES
 
const long MAX_EXEC_MS_SLOW = 45 * MINUTES
 
const long MAX_EXEC_MS_ENV = 45 * MINUTES
 
const long MAX_EXEC_MS_VGSYS = 45 * MINUTES
 
const long WARN_SLOW_ABOVE_MS = 30 * MINUTES
 

Macro Definition Documentation

#define FLAGS_DIR   "flags"

Definition at line 76 of file UnitTester.hxx.

Referenced by flagDir().

#define FLAGS_EXT   "flag"

Definition at line 77 of file UnitTester.hxx.

Typedef Documentation

typedef void(* UnitTest_function)()

Definition at line 22 of file UnitTester.hxx.

Enumeration Type Documentation

Enumerator
TEST_OK 
TEST_TRAPPED 
TEST_FAILED_POSTCONDITION 
TEST_INTERRUPTED 
TEST_THREW 
TEST_INVALID 
TEST_UNKNOWN_RESULT 

Definition at line 24 of file UnitTester.hxx.

Function Documentation

UnitTestResult execute_guarded ( UnitTest_function  fun,
long duration_usec,
long  max_allowed_duration_ms,
bool  detect_environment_calls 
)
void sleepms ( long  ms)

Definition at line 354 of file UnitTester.cxx.

References ARB_sleep(), MS, and SEC.

Referenced by Mutex::Mutex(), and FunInfo::switch_to().

Variable Documentation

const long SECONDS = 1000

Definition at line 52 of file UnitTester.hxx.

const long MINUTES = 60*SECONDS

Definition at line 53 of file UnitTester.hxx.

const long MAX_EXEC_MS_NORMAL = 30 * MINUTES

Definition at line 68 of file UnitTester.hxx.

const long MAX_EXEC_MS_SLOW = 45 * MINUTES

Definition at line 69 of file UnitTester.hxx.

Referenced by Mutex::Mutex().

const long MAX_EXEC_MS_ENV = 45 * MINUTES

Definition at line 70 of file UnitTester.hxx.

const long MAX_EXEC_MS_VGSYS = 45 * MINUTES

Definition at line 71 of file UnitTester.hxx.

const long WARN_SLOW_ABOVE_MS = 30 * MINUTES

Definition at line 72 of file UnitTester.hxx.