TestUtilities Namespace Reference

Convenience functions for testing plug-ins and other code. More...


Functions

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


Detailed Description

Convenience functions for testing plug-ins and other code.

This namespace contains functions that can be used by Testable plug-ins or other code to implement test code to test plug-in functionality.

The following related macros may also be helpful when writing test code:


Function Documentation

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

Reports errors to an output stream.

Warning:
The assertion logger is used in conjunction with the testAssert() macro to report errors to an output stream, and should not be called directly.
Parameters:
output The output stream in which to report the error.
expression The conditional source code expression causing the error.
file The source file in which the error occurred.
line The line in the source file where the error occurred.
Returns:
Always returns false.

std::string TestUtilities::getTestDataPath (  ) 

Returns a directory path that can be used to import data for testing.

Returns:
Returns the directory path specified in the import path configuration setting.
See also:
ConfigurationSettings::getSettingImportPath()


Software Development Kit - Opticks 4.8.0 Build 15482