NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
WvTest Class Reference

#include <wvtest.h>

Classes

struct  NovaErr
struct  NulErr

Public Member Functions

 WvTest (const char *file, int line, const char *condstr)
bool check (bool cond, const char *suffix="")
unsigned check_nulerr (unsigned nulerr)
unsigned check_novaerr (unsigned novaerr)
bool check_eq (const char *a, const char *b, bool expect_equal)
bool check_eq (char *a, char *b, bool expect_equal)
bool check_eq (const char *a, char *b, bool expect_equal)
bool check_eq (char *a, const char *b, bool expect_equal)
template<typename T >
bool check_eq (T a, T b, bool expect_equal)
template<typename T >
bool check_lt (T a, T b)
template<typename T >
bool check_le (T a, T b)
template<typename T >
check_perf (T val, const char *units)
const char * show (const char *val)
char * show (char *val)
template<typename T >
show (T val)
template<typename T >
show_hex (T val)
 __attribute__ ((noreturn)) static void exit(const char *msg=0)
 Custom exit function.
 WvTest (const char *file, int line, const char *condstr)
bool check (bool cond, const char *suffix="")
unsigned check_nulerr (unsigned nulerr)
unsigned check_novaerr (unsigned novaerr)
bool check_eq (const char *a, const char *b, bool expect_equal)
bool check_eq (char *a, char *b, bool expect_equal)
bool check_eq (const char *a, char *b, bool expect_equal)
bool check_eq (char *a, const char *b, bool expect_equal)
template<typename T >
bool check_eq (T a, T b, bool expect_equal)
template<typename T >
bool check_lt (T a, T b)
template<typename T >
bool check_le (T a, T b)
template<typename T >
check_perf (T val, const char *units)
const char * show (const char *val)
char * show (char *val)
template<typename T >
show (T val)
template<typename T >
show_hex (T val)
 __attribute__ ((noreturn)) static void exit(const char *msg=0)
 Custom exit function.

Static Public Member Functions

static const char * repo_rel_path (const char *filename)
static const char * repo_rel_path (const char *filename)

Private Member Functions

const char * resultstr (bool result)
const char * resultstr (char *result)
const char * resultstr (NulErr result)
const char * resultstr (NovaErr result)
void save_info (const char *_file, int _line, const char *_condstr)
template<typename T >
void print_result (T result, const char *suffix="", const char *sb="", const char *se="")
const char * resultstr (bool result)
const char * resultstr (char *result)
const char * resultstr (NulErr result)
const char * resultstr (NovaErr result)
void save_info (const char *_file, int _line, const char *_condstr)
template<typename T >
void print_result (T result, const char *suffix="", const char *sb="", const char *se="")

Static Private Member Functions

static void print_failed_cmp (const char *op, const char *a, const char *b)
static void print_failed_cmp (const char *op, unsigned a, unsigned b)
static void print_failed_cmp (const char *op, unsigned long a, unsigned long b)
static void print_failed_cmp (const char *op, unsigned long long a, unsigned long long b)
static void print_failed_cmp (const char *op, int a, int b)
static void stringify (char *buf, unsigned size, unsigned long long val)
static void stringify (char *buf, unsigned size, unsigned long val)
static void stringify (char *buf, unsigned size, unsigned val)
static void stringify (char *buf, unsigned size, int val)
static void stringify (char *buf, unsigned size, Crd crd)
static void stringifyx (char *buf, unsigned size, unsigned long long val)
static void stringifyx (char *buf, unsigned size, unsigned long val)
static void stringifyx (char *buf, unsigned size, unsigned val)
static void stringifyx (char *buf, unsigned size, int val)
static void stringifyx (char *buf, unsigned size, void *val)
static void print_failed_cmp (const char *op, const char *a, const char *b)
static void print_failed_cmp (const char *op, unsigned a, unsigned b)
static void print_failed_cmp (const char *op, unsigned long a, unsigned long b)
static void print_failed_cmp (const char *op, unsigned long long a, unsigned long long b)
static void print_failed_cmp (const char *op, int a, int b)
static void stringify (char *buf, unsigned size, unsigned long long val)
static void stringify (char *buf, unsigned size, unsigned long val)
static void stringify (char *buf, unsigned size, unsigned val)
static void stringify (char *buf, unsigned size, int val)
static void stringify (char *buf, unsigned size, Crd crd)
static void stringifyx (char *buf, unsigned size, unsigned long long val)
static void stringifyx (char *buf, unsigned size, unsigned long val)
static void stringifyx (char *buf, unsigned size, unsigned val)
static void stringifyx (char *buf, unsigned size, int val)
static void stringifyx (char *buf, unsigned size, void *val)

Private Attributes

const char * file
const char * condstr
int line

Constructor & Destructor Documentation

WvTest::WvTest ( const char *  file,
int  line,
const char *  condstr 
)
inline
WvTest::WvTest ( const char *  file,
int  line,
const char *  condstr 
)
inline

Member Function Documentation

WvTest::__attribute__ ( (noreturn)  ) const
inlinepure virtual

Custom exit function.

Reports exit as a failure because it is typically called via assert() or panic(). Use this as ASMFUNCS(..., WvTest).

WvTest::__attribute__ ( (noreturn)  ) const
inlinepure virtual

Custom exit function.

Reports exit as a failure because it is typically called via assert() or panic(). Use this as ASMFUNCS(..., WvTest).

bool WvTest::check ( bool  cond,
const char *  suffix = "" 
)
inline
bool WvTest::check ( bool  cond,
const char *  suffix = "" 
)
inline
bool WvTest::check_eq ( const char *  a,
const char *  b,
bool  expect_equal 
)
inline
bool WvTest::check_eq ( const char *  a,
const char *  b,
bool  expect_equal 
)
inline
bool WvTest::check_eq ( char *  a,
char *  b,
bool  expect_equal 
)
inline
bool WvTest::check_eq ( char *  a,
char *  b,
bool  expect_equal 
)
inline
bool WvTest::check_eq ( const char *  a,
char *  b,
bool  expect_equal 
)
inline
bool WvTest::check_eq ( const char *  a,
char *  b,
bool  expect_equal 
)
inline
bool WvTest::check_eq ( char *  a,
const char *  b,
bool  expect_equal 
)
inline
bool WvTest::check_eq ( char *  a,
const char *  b,
bool  expect_equal 
)
inline
template<typename T >
bool WvTest::check_eq ( a,
b,
bool  expect_equal 
)
inline
template<typename T >
bool WvTest::check_eq ( a,
b,
bool  expect_equal 
)
inline
template<typename T >
bool WvTest::check_le ( a,
b 
)
inline
template<typename T >
bool WvTest::check_le ( a,
b 
)
inline
template<typename T >
bool WvTest::check_lt ( a,
b 
)
inline
template<typename T >
bool WvTest::check_lt ( a,
b 
)
inline
unsigned WvTest::check_novaerr ( unsigned  novaerr)
inline
unsigned WvTest::check_novaerr ( unsigned  novaerr)
inline
unsigned WvTest::check_nulerr ( unsigned  nulerr)
inline
unsigned WvTest::check_nulerr ( unsigned  nulerr)
inline
template<typename T >
T WvTest::check_perf ( val,
const char *  units 
)
inline
template<typename T >
T WvTest::check_perf ( val,
const char *  units 
)
inline
static void WvTest::print_failed_cmp ( const char *  op,
const char *  a,
const char *  b 
)
inlinestaticprivate
static void WvTest::print_failed_cmp ( const char *  op,
const char *  a,
const char *  b 
)
inlinestaticprivate
static void WvTest::print_failed_cmp ( const char *  op,
unsigned  a,
unsigned  b 
)
inlinestaticprivate
static void WvTest::print_failed_cmp ( const char *  op,
unsigned  a,
unsigned  b 
)
inlinestaticprivate
static void WvTest::print_failed_cmp ( const char *  op,
unsigned long  a,
unsigned long  b 
)
inlinestaticprivate
static void WvTest::print_failed_cmp ( const char *  op,
unsigned long  a,
unsigned long  b 
)
inlinestaticprivate
static void WvTest::print_failed_cmp ( const char *  op,
unsigned long long  a,
unsigned long long  b 
)
inlinestaticprivate
static void WvTest::print_failed_cmp ( const char *  op,
unsigned long long  a,
unsigned long long  b 
)
inlinestaticprivate
static void WvTest::print_failed_cmp ( const char *  op,
int  a,
int  b 
)
inlinestaticprivate
static void WvTest::print_failed_cmp ( const char *  op,
int  a,
int  b 
)
inlinestaticprivate
template<typename T >
void WvTest::print_result ( result,
const char *  suffix = "",
const char *  sb = "",
const char *  se = "" 
)
inlineprivate
template<typename T >
void WvTest::print_result ( result,
const char *  suffix = "",
const char *  sb = "",
const char *  se = "" 
)
inlineprivate
static const char* WvTest::repo_rel_path ( const char *  filename)
inlinestatic
static const char* WvTest::repo_rel_path ( const char *  filename)
inlinestatic
const char* WvTest::resultstr ( bool  result)
inlineprivate
const char* WvTest::resultstr ( bool  result)
inlineprivate
const char* WvTest::resultstr ( char *  result)
inlineprivate
const char* WvTest::resultstr ( char *  result)
inlineprivate
const char* WvTest::resultstr ( NulErr  result)
inlineprivate
const char* WvTest::resultstr ( NulErr  result)
inlineprivate
const char* WvTest::resultstr ( NovaErr  result)
inlineprivate
const char* WvTest::resultstr ( NovaErr  result)
inlineprivate
void WvTest::save_info ( const char *  _file,
int  _line,
const char *  _condstr 
)
inlineprivate
void WvTest::save_info ( const char *  _file,
int  _line,
const char *  _condstr 
)
inlineprivate
const char* WvTest::show ( const char *  val)
inline
const char* WvTest::show ( const char *  val)
inline
char* WvTest::show ( char *  val)
inline
char* WvTest::show ( char *  val)
inline
template<typename T >
T WvTest::show ( val)
inline
template<typename T >
T WvTest::show ( val)
inline
template<typename T >
T WvTest::show_hex ( val)
inline
template<typename T >
T WvTest::show_hex ( val)
inline
static void WvTest::stringify ( char *  buf,
unsigned  size,
unsigned long long  val 
)
inlinestaticprivate
static void WvTest::stringify ( char *  buf,
unsigned  size,
unsigned long long  val 
)
inlinestaticprivate
static void WvTest::stringify ( char *  buf,
unsigned  size,
unsigned long  val 
)
inlinestaticprivate
static void WvTest::stringify ( char *  buf,
unsigned  size,
unsigned long  val 
)
inlinestaticprivate
static void WvTest::stringify ( char *  buf,
unsigned  size,
unsigned  val 
)
inlinestaticprivate
static void WvTest::stringify ( char *  buf,
unsigned  size,
unsigned  val 
)
inlinestaticprivate
static void WvTest::stringify ( char *  buf,
unsigned  size,
int  val 
)
inlinestaticprivate
static void WvTest::stringify ( char *  buf,
unsigned  size,
int  val 
)
inlinestaticprivate
static void WvTest::stringify ( char *  buf,
unsigned  size,
Crd  crd 
)
inlinestaticprivate
static void WvTest::stringify ( char *  buf,
unsigned  size,
Crd  crd 
)
inlinestaticprivate
static void WvTest::stringifyx ( char *  buf,
unsigned  size,
unsigned long long  val 
)
inlinestaticprivate
static void WvTest::stringifyx ( char *  buf,
unsigned  size,
unsigned long long  val 
)
inlinestaticprivate
static void WvTest::stringifyx ( char *  buf,
unsigned  size,
unsigned long  val 
)
inlinestaticprivate
static void WvTest::stringifyx ( char *  buf,
unsigned  size,
unsigned long  val 
)
inlinestaticprivate
static void WvTest::stringifyx ( char *  buf,
unsigned  size,
unsigned  val 
)
inlinestaticprivate
static void WvTest::stringifyx ( char *  buf,
unsigned  size,
unsigned  val 
)
inlinestaticprivate
static void WvTest::stringifyx ( char *  buf,
unsigned  size,
int  val 
)
inlinestaticprivate
static void WvTest::stringifyx ( char *  buf,
unsigned  size,
int  val 
)
inlinestaticprivate
static void WvTest::stringifyx ( char *  buf,
unsigned  size,
void *  val 
)
inlinestaticprivate
static void WvTest::stringifyx ( char *  buf,
unsigned  size,
void *  val 
)
inlinestaticprivate

Member Data Documentation

const char * WvTest::condstr
private
const char * WvTest::file
private
int WvTest::line
private

The documentation for this class was generated from the following files: