Pothos
0.2.1-g9f04573d
The Pothos dataflow programming software suite
|
#include <Pothos/Config.hpp>
#include <Pothos/Plugin.hpp>
#include <Pothos/Callable.hpp>
#include <Pothos/Exception.hpp>
#include <memory>
#include <string>
Go to the source code of this file.
Classes | |
struct | Pothos::TestingBase |
Namespaces | |
Pothos | |
Macros | |
#define | POTHOS_TEST_BLOCK(path, name) |
#define | POTHOS_TEST_CHECKPOINT() Pothos::TestingBase::current().report("checkpoint", "", "", __LINE__, __FILE__) |
Checkpoint macro to track last successful line executed. More... | |
#define | __POTHOS_TEST_STATEMENT(message, statement) |
Private macro to test a statement for exceptions. More... | |
#define | __POTHOS_TEST_ASSERT(message, statement) |
Private macro to assert on a statement's truth. More... | |
#define | POTHOS_TEST_TRUE(statement) |
Test if statement is true. More... | |
#define | POTHOS_TEST_EQUAL(lhs, rhs) |
Test if an equality operation is true. More... | |
#define | POTHOS_TEST_EQUALV(lhs, rhs) |
Test two vectors for equality. More... | |
#define | POTHOS_TEST_EQUALA(lhs, rhs, size) |
Test two arrays for equality. More... | |
#define | POTHOS_TEST_THROWS(statement, expectedException) |
Test that a statement throws a particular exception. More... | |
Macros for creating self-test plugins. Self tests are installed into the registry and executed at runtime. The test macros are loosely based on the Boost unit test suite.
#define __POTHOS_TEST_ASSERT | ( | message, | |
statement | |||
) |
Private macro to assert on a statement's truth.
#define __POTHOS_TEST_STATEMENT | ( | message, | |
statement | |||
) |
Private macro to test a statement for exceptions.
#define POTHOS_TEST_BLOCK | ( | path, | |
name | |||
) |
Declare a unit test block of code inside a plugin.
The unit test will be installed into /path/name in the PluginRegistry. Once installed, this unit test can be checked with the test utility.
path | a valid PluginPath |
name | a valid function name |
Example usage:
#define POTHOS_TEST_CHECKPOINT | ( | ) | Pothos::TestingBase::current().report("checkpoint", "", "", __LINE__, __FILE__) |
Checkpoint macro to track last successful line executed.
#define POTHOS_TEST_EQUAL | ( | lhs, | |
rhs | |||
) |
Test if an equality operation is true.
#define POTHOS_TEST_EQUALA | ( | lhs, | |
rhs, | |||
size | |||
) |
Test two arrays for equality.
#define POTHOS_TEST_EQUALV | ( | lhs, | |
rhs | |||
) |
Test two vectors for equality.
#define POTHOS_TEST_THROWS | ( | statement, | |
expectedException | |||
) |
Test that a statement throws a particular exception.
#define POTHOS_TEST_TRUE | ( | statement | ) |
Test if statement is true.