GCC Middle and Back End API Reference
analyzer-selftests.h
Go to the documentation of this file.
1/* Selftests for the analyzer.
2 Copyright (C) 2019-2026 Free Software Foundation, Inc.
3 Contributed by David Malcolm <dmalcolm@redhat.com>.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it
8under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 3, or (at your option)
10any later version.
11
12GCC is distributed in the hope that it will be useful, but
13WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
20
21#ifndef GCC_ANALYZER_SELFTESTS_H
22#define GCC_ANALYZER_SELFTESTS_H
23
24#if CHECKING_P
25
26namespace ana {
27
28namespace selftest {
29
30extern tree build_global_decl (const char *name, tree type);
31
32extern tree
33make_string_constant (const char *str);
34
35extern tree
36make_test_compound_type (const char *name, bool is_struct,
37 const std::vector<tree> fields);
38
39/* Selftest fixture for creating the type "struct coord {int x; int y; };". */
40
41struct coord_test
42{
43 coord_test ();
44
45 tree m_x_field;
46 tree m_y_field;
47 tree m_coord_type;
48};
49
50extern void run_analyzer_selftests ();
51
52/* Declarations for specific families of tests (by source file), in
53 alphabetical order. */
54extern void analyzer_access_diagram_cc_tests ();
55extern void analyzer_complexity_cc_tests ();
56extern void analyzer_concrete_ranges_cc_tests ();
57extern void analyzer_constraint_manager_cc_tests ();
58extern void analyzer_function_set_cc_tests ();
59extern void analyzer_integer_cc_tests ();
60extern void analyzer_integer_with_unit_cc_tests ();
61extern void analyzer_program_point_cc_tests ();
62extern void analyzer_program_state_cc_tests ();
63extern void analyzer_region_model_cc_tests ();
64extern void analyzer_region_model_manager_cc_tests ();
65extern void analyzer_sm_file_cc_tests ();
66extern void analyzer_sm_signal_cc_tests ();
67extern void analyzer_store_cc_tests ();
68extern void analyzer_string_scan_cc_tests ();
69extern void analyzer_symbolic_bit_contents_cc_tests ();
70extern void analyzer_symbolic_bit_vectors_cc_tests ();
71extern void analyzer_symbolic_memory_ranges_cc_tests ();
72extern void analyzer_symbolic_nodes_cc_tests ();
73extern void analyzer_symbolic_pointers_cc_tests ();
74extern void analyzer_symbolic_ranges_cc_tests ();
75extern void analyzer_symbolic_scalars_cc_tests ();
76
77} /* end of namespace ana::selftest. */
78
79} // namespace ana
80
81#endif /* #if CHECKING_P */
82
83#endif /* GCC_ANALYZER_SELFTESTS_H */
union tree_node * tree
Definition coretypes.h:97
fields
Definition gengtype.cc:622
Definition access-diagram.h:30