]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdbsupport/selftest.h
Always use std::function for self-tests
[thirdparty/binutils-gdb.git] / gdbsupport / selftest.h
index d76fc4b37d368c7516ae1417df551c8102c55a31..2326ebad495eb932161fc580e1056d666fb06b9e 100644 (file)
 /* A test is just a function that does some checks and throws an
    exception if something has gone wrong.  */
 
-typedef void self_test_function (void);
-
 namespace selftests
 {
 
-/* Interface for the various kinds of selftests.  */
-
-struct selftest
-{
-  virtual ~selftest () = default;
-  virtual void operator() () const = 0;
-};
-
 /* True if selftest should run verbosely.  */
 
 extern bool run_verbose ();
 
 /* Register a new self-test.  */
 
-extern void register_test (const std::string &name, selftest *test);
-
-/* Register a new self-test.  */
-
 extern void register_test (const std::string &name,
                           std::function<void(void)> function);