MeVisLab Toolbox Reference
MLPCLTestTools Namespace Reference

Namespace containing useful tools for Google tests written for PCL related classes in MeVisLab. More...

Typedefs

typedef void(* OverrideTestDefaultsFunc) (mlModule *modulePtr, const char *className)
 A function type which allows to set fields of the module with class name className and given with modulePtr before it is tested with arbitrary inputs and field touches.
 

Functions

MLPCLSUPPORT_EXPORT MLLibraryHandle loadPCLLibrary (const char *const modName) ML_RETURN_VALUE_SHOULD_BE_USED
 Loads a MeVisLab library with name modName and returns a non-nullptr handle to the library on success, and nullptr on failure.
 
MLPCLSUPPORT_EXPORT MLErrorCode unloadPCLLibrary (MLLibraryHandle modLibHandle, const char *const modName) ML_RETURN_VALUE_SHOULD_BE_USED
 Unloads a MeVisLab library with name modName and handle modLibHandle; returns ML_RESULT_OK on success or another error code on failure.
 
MLPCLSUPPORT_EXPORT MLErrorCode setUpPCLTestTools () ML_RETURN_VALUE_SHOULD_BE_USED
 Initializes some internals needed by the subsequent tool functions and loads MLBasicModules; returns ML_RESULT_OK on success or another error code on failure.
 
MLPCLSUPPORT_EXPORT MLErrorCode tearDownPCLTestTools () ML_RETURN_VALUE_SHOULD_BE_USED
 Cleans up some internals initialized with setUpPCLTestTools() and unloads MLBasicModules; returns ML_RESULT_OK on success or another error code on failure.
 
MLPCLSUPPORT_EXPORT MLErrorCode runClassInstancesTest (const char *const *pclClassNames, size_t numPCLClassNames, OverrideTestDefaultsFunc overrideTestDefaults=nullptr, bool pclSupportItselfIsTested=false, size_t numIndirectlyLoadedPCLClasses=0) ML_RETURN_VALUE_SHOULD_BE_USED
 Runs some heavy tests on the module with class name className and given with modulePtr before it is tested with arbitrary inputs and field touches.
 

Variables

MLPCLSUPPORT_EXPORT MLuint64 _MaxSigned32BitIndex
 This variable is exported for testing purposes only.
 
MLPCLSUPPORT_EXPORT MLuint64 _MaxUnsigned32BitIndex
 This variable is exported for testing purposes only.
 

Detailed Description

Namespace containing useful tools for Google tests written for PCL related classes in MeVisLab.

Typedef Documentation

◆ OverrideTestDefaultsFunc

typedef void(* MLPCLTestTools::OverrideTestDefaultsFunc) (mlModule *modulePtr, const char *className)

A function type which allows to set fields of the module with class name className and given with modulePtr before it is tested with arbitrary inputs and field touches.

Definition at line 38 of file mlPCLSupportTestTools.h.

Function Documentation

◆ loadPCLLibrary()

MLPCLSUPPORT_EXPORT MLLibraryHandle MLPCLTestTools::loadPCLLibrary ( const char *const modName)
extern

Loads a MeVisLab library with name modName and returns a non-nullptr handle to the library on success, and nullptr on failure.

◆ runClassInstancesTest()

MLPCLSUPPORT_EXPORT MLErrorCode MLPCLTestTools::runClassInstancesTest ( const char *const * pclClassNames,
size_t numPCLClassNames,
OverrideTestDefaultsFunc overrideTestDefaults = nullptr,
bool pclSupportItselfIsTested = false,
size_t numIndirectlyLoadedPCLClasses = 0 )
extern

Runs some heavy tests on the module with class name className and given with modulePtr before it is tested with arbitrary inputs and field touches.

IMPORTANT: Also tests on the runtime type interfaces are performed and the RuntimeTypes are deleted from the RunTimeType system. The tested modules and module types will not be usable any more afterwards.

Parameters
pclClassNamesThe table of class names registered in the ML Runtime Type system.
numPCLClassNamesThe number of table entries in pclClassNames.
overrideTestDefaultsA pointer to a function which can set up a module instance before testing it to avoid unnecessary errors.
pclSupportItselfIsTestedMust always be false; only to be set to true if the library PCLSupport is tested.
numIndirectlyLoadedPCLClassesMust specify the number of PCL classes loaded in other libraries than the tested one and PCLSupport; should be 0 if the tested library only makes use of PCLSupport. Returns ML_RESULT_OK on success or another error code on failure.

◆ setUpPCLTestTools()

MLPCLSUPPORT_EXPORT MLErrorCode MLPCLTestTools::setUpPCLTestTools ( )
extern

Initializes some internals needed by the subsequent tool functions and loads MLBasicModules; returns ML_RESULT_OK on success or another error code on failure.

◆ tearDownPCLTestTools()

MLPCLSUPPORT_EXPORT MLErrorCode MLPCLTestTools::tearDownPCLTestTools ( )
extern

Cleans up some internals initialized with setUpPCLTestTools() and unloads MLBasicModules; returns ML_RESULT_OK on success or another error code on failure.

◆ unloadPCLLibrary()

MLPCLSUPPORT_EXPORT MLErrorCode MLPCLTestTools::unloadPCLLibrary ( MLLibraryHandle modLibHandle,
const char *const modName )
extern

Unloads a MeVisLab library with name modName and handle modLibHandle; returns ML_RESULT_OK on success or another error code on failure.

Variable Documentation

◆ _MaxSigned32BitIndex

MLPCLSUPPORT_EXPORT MLuint64 MLPCLTestTools::_MaxSigned32BitIndex
extern

This variable is exported for testing purposes only.

It describes the maximum number of entries allowed for signed 32 bit indexing, for example often done in the PCL or in Open Inventor. It should always be ML_INT32_MAX in normal operation, however, for internal testing purposes it can be modified temporarily. Not for public use!

◆ _MaxUnsigned32BitIndex

MLPCLSUPPORT_EXPORT MLuint64 MLPCLTestTools::_MaxUnsigned32BitIndex
extern

This variable is exported for testing purposes only.

It describes the maximum number of entries allowed for unsigned 32 bit indexing, for example often done in the PCL or in Open Inventor. It should always be ML_UINT32_MAX in normal operation, however, for internal testing purposes it can be modified temporarily. Not for public use!