diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:36:23 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:46:02 -0500 |
commit | c583a2520616c2736cffc389c89a48b159366e6c (patch) | |
tree | b4925f26506fcee96c16119431c01760f05db95d /gdbsupport/selftest.h | |
parent | ca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff) | |
download | binutils-users/simark/clang-format.zip binutils-users/simark/clang-format.tar.gz binutils-users/simark/clang-format.tar.bz2 |
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdbsupport/selftest.h')
-rw-r--r-- | gdbsupport/selftest.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/gdbsupport/selftest.h b/gdbsupport/selftest.h index fba6baf..e441dc7 100644 --- a/gdbsupport/selftest.h +++ b/gdbsupport/selftest.h @@ -36,10 +36,11 @@ namespace selftests struct selftest { selftest (std::string name, std::function<void (void)> test) - : name { std::move (name) }, test { std::move (test) } - { } - bool operator< (const selftest &rhs) const - { return name < rhs.name; } + : name { std::move (name) }, + test { std::move (test) } + { + } + bool operator<(const selftest &rhs) const { return name < rhs.name; } std::string name; std::function<void (void)> test; @@ -60,7 +61,7 @@ extern bool run_verbose (); /* Register a new self-test. */ extern void register_test (const std::string &name, - std::function<void(void)> function); + std::function<void (void)> function); /* A selftest generator is a callback function used to delay the generation of selftests. */ @@ -79,18 +80,20 @@ extern void add_lazy_generator (selftests_generator generator); element of FILTERS. */ extern void run_tests (gdb::array_view<const char *const> filters, - bool verbose = false); + bool verbose = false); /* Reset GDB or GDBserver's internal state. */ extern void reset (); -} +} // namespace selftests /* Check that VALUE is true, and, if not, throw an exception. */ -#define SELF_CHECK(VALUE) \ - do { \ - if (!(VALUE)) \ - error (_("self-test failed at %s:%d"), __FILE__, __LINE__); \ - } while (0) +#define SELF_CHECK(VALUE) \ + do \ + { \ + if (!(VALUE)) \ + error (_ ("self-test failed at %s:%d"), __FILE__, __LINE__); \ + } \ + while (0) #endif /* COMMON_SELFTEST_H */ |