[gdb] Change register_test to use std::function arg

Change register_test to use std::function arg, such that we can do:
...
  register_test (test_name, [=] () { SELF_CHECK (...); });
...

Tested on x86_64-linux.
This commit is contained in:
Tom de Vries
2021-09-21 00:41:26 +02:00
parent 6f265beb28
commit c45a683f8f
3 changed files with 25 additions and 22 deletions

View File

@@ -44,7 +44,7 @@ extern void register_test (const std::string &name, selftest *test);
/* Register a new self-test. */
extern void register_test (const std::string &name,
self_test_function *function);
std::function<void(void)> function);
/* Run all the self tests. This print a message describing the number
of test and the number of failures.