fluidvis
Public Member Functions | List of all members
sx::XUnit Class Reference

#include <XUnit.h>

Public Member Functions

EXL XUnit (Logger *logger)
 
EXL ~XUnit ()
 
EXL void addMarkup (string comment)
 
EXL void addAnnotation (string annotation)
 
EXL void assertTrue (bool value)
 
EXL void assertEquals (char v1, char v2)
 
EXL void assertEquals (unsigned char v1, unsigned char v2)
 
EXL void assertEquals (short v1, short v2)
 
EXL void assertEquals (unsigned short v1, unsigned short v2)
 
EXL void assertEquals (int v1, int v2)
 
EXL void assertEquals (unsigned int v1, unsigned int v2)
 
EXL void assertEquals (long v1, long v2)
 
EXL void assertEquals (unsigned long v1, unsigned long v2)
 
EXL void assertEquals (float v1, float v2)
 
EXL void assertEquals (float v1, float v2, float epsilon)
 
EXL void assertEquals (double v1, double v2)
 
EXL void assertEquals (double v1, double v2, double epsilon)
 
EXL void assertEquals (string v1, string v2)
 
EXL void assertInputYes (string message)
 

Detailed Description

collects information about the test cases

Constructor & Destructor Documentation

EXL sx::XUnit::XUnit ( Logger logger)

Constructs a XUnit object with a logger.

Parameters
loggermust be a valid Logger, messages about the outcome of the tests are passed to the logger
EXL sx::XUnit::~XUnit ( )

deconstructor

Member Function Documentation

EXL void sx::XUnit::addAnnotation ( string  annotation)

Appends an annotation to the test's log with annotation message annotation.

Parameters
annotationthe annotation message
EXL void sx::XUnit::addMarkup ( string  comment)

Appends a markup to the test's log with markup message comment.

Parameters
commentthe added markup has markup message comment
EXL void sx::XUnit::assertEquals ( char  v1,
char  v2 
)

the test is passed, iff v1 and v2 have the same value

EXL void sx::XUnit::assertEquals ( unsigned char  v1,
unsigned char  v2 
)

the test is passed, iff v1 and v2 have the same value

EXL void sx::XUnit::assertEquals ( short  v1,
short  v2 
)

the test is passed, iff v1 and v2 have the same value

EXL void sx::XUnit::assertEquals ( unsigned short  v1,
unsigned short  v2 
)

the test is passed, iff v1 and v2 have the same value

EXL void sx::XUnit::assertEquals ( int  v1,
int  v2 
)

the test is passed, iff v1 and v2 have the same value

EXL void sx::XUnit::assertEquals ( unsigned int  v1,
unsigned int  v2 
)

the test is passed, iff v1 and v2 have the same value

EXL void sx::XUnit::assertEquals ( long  v1,
long  v2 
)

the test is passed, iff v1 and v2 have the same value

EXL void sx::XUnit::assertEquals ( unsigned long  v1,
unsigned long  v2 
)

the test is passed, iff v1 and v2 have the same value

EXL void sx::XUnit::assertEquals ( float  v1,
float  v2 
)

the test is passed, iff v1 and v2 have the same value

EXL void sx::XUnit::assertEquals ( float  v1,
float  v2,
float  epsilon 
)

the test is passed, iff the absolute value of the difference of v1 and v2 is smaller or equal to epsilon

EXL void sx::XUnit::assertEquals ( double  v1,
double  v2 
)

the test is passed, iff v1 and v2 have the same value

EXL void sx::XUnit::assertEquals ( double  v1,
double  v2,
double  epsilon 
)

the test is passed, iff the absolute value of the difference of v1 and v2 is smaller or equal to epsilon

EXL void sx::XUnit::assertEquals ( string  v1,
string  v2 
)

the test is passed, iff v1 and v2 are made of exactly the same character sequences

EXL void sx::XUnit::assertInputYes ( string  message)

Waits for the user to input text in the console. The test is passed, iff the user inputs the string 'y'.

Parameters
messageText displayed at the console to ask the user for an input. The string (y/n) is appended to message.
EXL void sx::XUnit::assertTrue ( bool  value)

the test is passed, iff value is true


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