E-MailRelay

Static Public Member Functions | List of all members
G::Test Class Reference

A static interface for enabling test features at run-time. More...

`#include <gtest.h>`

## Static Public Member Functions
static void | set (const std::string &)
| Sets the test specification string. More...
static bool | enabled () noexcept
| Returns true if test features are enabled. More...
static bool | enabled (const char *name)
| Returns true if the specified test feature is enabled. More...

## Detailed Description

A static interface for enabling test features at run-time.

Typically does nothing in a release build. Test are enabled by a specification string that is a comma-separated list of test names. The test specification is taken from an environment variable by default, or it can be set programatically.

Eg:

for(..)
{
if( G::Test::enabled("run-loop-extra-slowly") )
sleep(1) ;
...
}
G::Test::enabled
static bool enabled() noexcept
Returns true if test features are enabled.
Definition: gtest.cpp:79

Definition at line 49 of file gtest.h.

## Member Function Documentation

## ◆ enabled() [1/2]

bool G::Test::enabled | ( |  | ) |
| static noexcept

Returns true if test features are enabled.

Definition at line 79 of file gtest.cpp.

## ◆ enabled() [2/2]

bool G::Test::enabled | ( | const char * | name | ) |
| inline static

Returns true if the specified test feature is enabled.

Definition at line 68 of file gtest.h.

## ◆ set()

void G::Test::set | ( | const std::string & |  | ) |
| static

Sets the test specification string.

Definition at line 76 of file gtest.cpp.

The documentation for this class was generated from the following files:

- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/glib/gtest.h
- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/glib/gtest.cpp