2 Copyright (C) 2016-2017 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 #include "common-defs.h"
20 #include "common-exceptions.h"
21 #include "common-debug.h"
28 /* All the tests that have been registered. */
30 static std::vector
<self_test_function
*> tests
;
35 register_test (self_test_function
*function
)
37 tests
.push_back (function
);
47 for (int i
= 0; i
< tests
.size (); ++i
)
53 CATCH (ex
, RETURN_MASK_ERROR
)
56 debug_printf ("Self test failed: %s\n", ex
.message
);
63 debug_printf ("Ran %lu unit tests, %d failed\n",
64 (long) tests
.size (), failed
);
66 } // namespace selftests
This page took 0.032288 seconds and 5 git commands to generate.