## class SG_EXPORT osgUtx::TestGraph

> TestGraph is a singleton providing central access to the tree of tests; primarily, it provides access to the root suite

### Public Methods

static TestGraph& instance()
TestSuite* root()
TestSuite* suite(const std::string& path, TestSuite* tsuite = 0, bool createIfNecessary = false)
  A utility function for accessing an arbitrary quite by pathname, relative to the suite 'tsuite' (defaults to root if null), and with the option of creating the \em TestSuite designated by \em path, if it does not already exist.

## Documentation

> TestGraph is a singleton providing central access to the tree of tests; primarily, it provides access to the root suite

`static TestGraph& instance()`

`TestSuite* root()`
  Returns:
    a pointer to the root TestSuite.

`TestSuite* suite(const std::string& path, TestSuite* tsuite = 0, bool createIfNecessary = false)`
  A utility function for accessing an arbitrary quite by pathname, relative to the suite 'tsuite' (defaults to root if null), and with the option of creating the \em TestSuite designated by \em path, if it does not already exist.

  This method may return 0 if the suite either cannot be found (and createIfNecssary is 0), or the first component of \em path is not the same as the name of the TestSuite \em tsuite.

  This was written to aid the auto-registration of tests at specific points in the test tree, where the tests' AutoRegistrationAgents may be distributed across several files, and cannot be guaranteed to run in a given order. E.g. You cannot register a test "root.osg.MyTest" unless you know that the the suite "root.osg" already exists.

  Parameters:
    path - The name of the TestSuite to return.
    tsuite - The suite to 'start from'. Path is relative to this suite (defaults to root suite).
    createIfNecessary - Optionally create the TestSuite(s) denoted by path if they do not exist.

This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java

This page was generated with the help of DOC++.