forked from Imagelibrary/binutils-gdb
[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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user