GDBserver

Namespaces | Classes | Typedefs | Functions | Variables
selftests Namespace Reference

## Namespaces
| tdesc

## Classes
struct | selftest
struct | simple_selftest

## Typedefs
typedef void | for_each_selftest_ftype(const std::string &name)

## Functions
void | register_test (const std::string &name, selftest *test)
void | register_test (const std::string &name, self_test_function *function)
void | run_tests (const char *filter)
void | for_each_selftest (for_each_selftest_ftype func)
void | reset ()

## Variables
static std::map< std::string, std::unique_ptr< selftest > > | tests

## Typedef Documentation

## ◆ for_each_selftest_ftype

typedef void selftests::for_each_selftest_ftype(const std::string &name)

Definition at line 58 of file selftest.h.

## Function Documentation

## ◆ for_each_selftest()

void selftests::for_each_selftest | ( | for_each_selftest_ftype | func | ) |

Definition at line 106 of file selftest.c.

References tests.

## ◆ register_test() [1/2]

void selftests::register_test | ( | const std::string & | name,
|  | selftest * | test
| ) |  |

Definition at line 52 of file selftest.c.

References gdb_assert, name, and tests.

Referenced by initialize_low_arch(), initialize_low_tdesc(), and register_test().

## ◆ register_test() [2/2]

void selftests::register_test | ( | const std::string & | name,
|  | self_test_function * | function
| ) |  |

Definition at line 63 of file selftest.c.

References name, and register_test().

## ◆ reset()

void selftests::reset | ( |  | ) |

Referenced by run_tests().

## ◆ run_tests()

void selftests::run_tests | ( | const char * | filter | ) |

Definition at line 71 of file selftest.c.

References _, CATCH, debug_printf(), END_CATCH, name, reset(), RETURN_MASK_ERROR, string, tests, and TRY.

Referenced by captured_main().

## Variable Documentation

## ◆ tests

std::map<std::string, std::unique_ptr<selftest> > selftests::tests
| static

Definition at line 31 of file selftest.c.

Referenced by for_each_selftest(), register_test(), and run_tests().