7#ifndef PXR_BASE_TF_REG_TEST_H
8#define PXR_BASE_TF_REG_TEST_H
16#include "pxr/base/tf/api.h"
19#include "pxr/base/tf/hashmap.h"
22PXR_NAMESPACE_OPEN_SCOPE
89 static int Main(
int argc,
char *argv[]) {
90 return GetInstance()._Main(argc, argv);
107 bool Register(
const char* name,
RegFunc);
114 int _Main(
int argc,
char *argv[]);
116 void _PrintTestNames();
118 typedef TfHashMap<std::string, RegFunc, TfHash> _Hash;
119 typedef TfHashMap<std::string, RegFuncWithArgs, TfHash> _HashWithArgs;
120 _Hash _functionTable;
121 _HashWithArgs _functionTableWithArgs;
132#define TF_ADD_REGTEST(name) \
133 bool Tf_RegTst##name = TfRegTest::GetInstance().Register(#name, Test_##name)
135PXR_NAMESPACE_CLOSE_SCOPE
TfRegTest is a singleton class, which is used to register functions with either type bool (*)(int,...
static int Main(int argc, char *argv[])
Run a single regression test function, returning 0 if the function succeeded and 1 otherwise.
bool(* RegFunc)()
Type of a function with no arguments.
bool(* RegFuncWithArgs)(int argc, char *argv[])
Type of a function with arguments.
Manage a single instance of an object (see.
Manage a single instance of an object.