TestUtilities.h File Reference

#include <iostream>
#include <string>

Go to the source code of this file.

Namespaces

namespace  TestUtilities

Defines

#define testAssert(expression, output)   ((expression) ? true : TestUtilities::assertionLogger(output, #expression, __FILE__, __LINE__))
#define isseas(expression, output)   success = success && testAssert(expression, output)

Functions

std::string TestUtilities::getTestDataPath ()
bool TestUtilities::assertionLogger (std::ostream &output, const std::string &expression, const std::string &file, int line)


Define Documentation

#define isseas ( expression,
output   )     success = success && testAssert(expression, output)

Evaluates an expression and updates a success flag.

This macro first evaluates a success flag that must be named success. If the success flag evaluates to false, then this macro does nothing. If the success flag evaluates to true, the given expression is evaluated using the testAssert() macro and the success flag is updated to include the evaluation result.

isseas = if (success) success and-equals assert to stream

Parameters:
expression The conditional source code expression to check. It must evaluate to true or false.
output The output stream in which to report an error. An error is logged only if the given expression evaluates to false.
See also:
testAssert()

Definition at line 51 of file TestUtilities.h.

#define testAssert ( expression,
output   )     ((expression) ? true : TestUtilities::assertionLogger(output, #expression, __FILE__, __LINE__))

Evaluates an expression and reports errors to an output stream.

Parameters:
expression The conditional source code expression to check. It must evaluate to true or false.
output The output stream in which to report an error. An error is logged only if the given expression evaluates to false.
See also:
isseas()

Definition at line 28 of file TestUtilities.h.


Software Development Kit - Opticks 4.9.0 Build 16218