Line data Source code
1 : /* Selftest support for diagnostics.
2 : Copyright (C) 2019-2026 Free Software Foundation, Inc.
3 : Contributed by David Malcolm <dmalcolm@redhat.com>.
4 :
5 : This file is part of GCC.
6 :
7 : GCC is free software; you can redistribute it and/or modify it
8 : under the terms of the GNU General Public License as published by
9 : the Free Software Foundation; either version 3, or (at your option)
10 : any later version.
11 :
12 : GCC is distributed in the hope that it will be useful, but
13 : WITHOUT ANY WARRANTY; without even the implied warranty of
14 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 : General Public License for more details.
16 :
17 : You should have received a copy of the GNU General Public License
18 : along with GCC; see the file COPYING3. If not see
19 : <http://www.gnu.org/licenses/>. */
20 :
21 : #include "config.h"
22 : #include "system.h"
23 : #include "coretypes.h"
24 : #include "selftest.h"
25 : #include "diagnostics/diagnostics-selftests.h"
26 :
27 : #if CHECKING_P
28 :
29 : namespace diagnostics {
30 :
31 : namespace selftest {
32 :
33 : /* Run all diagnostics-specific selftests,
34 : apart from context_cc_tests, which according to
35 : https://gcc.gnu.org/pipermail/gcc/2021-November/237703.html
36 : has some language-specific assumptions, and thus is run from
37 : c_family_tests instead. */
38 :
39 : void
40 4 : run_diagnostics_selftests ()
41 : {
42 4 : color_cc_tests ();
43 4 : file_cache_cc_tests ();
44 4 : source_printing_cc_tests ();
45 4 : html_sink_cc_tests ();
46 4 : sarif_sink_cc_tests ();
47 4 : digraphs_cc_tests ();
48 4 : output_spec_cc_tests ();
49 4 : lazy_paths_cc_tests ();
50 4 : paths_output_cc_tests ();
51 4 : changes_cc_tests ();
52 4 : }
53 :
54 : } /* end of namespace diagnostics::selftest. */
55 :
56 : } // namespace diagnostics
57 :
58 : #endif /* #if CHECKING_P */
|