VTK
|
Utility functions used for regression testing. More...
#include <vtkTestUtilities.h>
Static Public Member Functions | |
static char * | GetDataRoot (int argc, char *argv[]) |
static char * | ExpandDataFileName (int argc, char *argv[], const char *fname, int slash=0) |
static char * | GetArgOrEnvOrDefault (const char *arg, int argc, char *argv[], const char *env, const char *def) |
static char * | ExpandFileNameWithArgOrEnvOrDefault (const char *arg, int argc, char *argv[], const char *env, const char *def, const char *fname, int slash=0) |
Utility functions used for regression testing.
vtkTestUtilities provides methods to perform common testing operations. These include getting a command line argument or an environment variable, or a default value. Particularly, there are specialized methods to get the root directory for VTK Data, expanding a filename with this root directory.
Definition at line 39 of file vtkTestUtilities.h.
char * vtkTestUtilities::GetDataRoot | ( | int | argc, |
char * | argv[] | ||
) | [inline, static] |
Function necessary for accessing the root directory for VTK data. Try the -D command line argument or VTK_DATA_ROOT or a default value. The returned string has to be deleted (with delete[]) by the user.
Definition at line 84 of file vtkTestUtilities.h.
char * vtkTestUtilities::ExpandDataFileName | ( | int | argc, |
char * | argv[], | ||
const char * | fname, | ||
int | slash = 0 |
||
) | [inline, static] |
Given a file name, this function returns a new string which is (in theory) the full path. This path is constructed by prepending the file name with a command line argument (-D path) or VTK_DATA_ROOT env. variable. If slash is true, appends a slash to the resulting string. The returned string has to be deleted (with delete[]) by the user.
Definition at line 93 of file vtkTestUtilities.h.
char * vtkTestUtilities::GetArgOrEnvOrDefault | ( | const char * | arg, |
int | argc, | ||
char * | argv[], | ||
const char * | env, | ||
const char * | def | ||
) | [inline, static] |
Function returning either a command line argument, an environment variable or a default value. The returned string has to be deleted (with delete[]) by the user.
Definition at line 106 of file vtkTestUtilities.h.
char * vtkTestUtilities::ExpandFileNameWithArgOrEnvOrDefault | ( | const char * | arg, |
int | argc, | ||
char * | argv[], | ||
const char * | env, | ||
const char * | def, | ||
const char * | fname, | ||
int | slash = 0 |
||
) | [inline, static] |
Given a file name, this function returns a new string which is (in theory) the full path. This path is constructed by prepending the file name with a command line argument, an environment variable or a default value. If slash is true, appends a slash to the resulting string. The returned string has to be deleted (with delete[]) by the user.
Definition at line 151 of file vtkTestUtilities.h.