GCC Middle and Back End API Reference
selftests.h
Go to the documentation of this file.
1/* Copyright (C) 2023-2025 Free Software Foundation, Inc.
2 Contributed by David Malcolm <dmalcolm@redhat.com>.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
19
20#ifndef GCC_TEXT_ART_SELFTESTS_H
21#define GCC_TEXT_ART_SELFTESTS_H
22
23#if CHECKING_P
24
25namespace text_art {
26 class canvas;
27} // namespace text_art
28
29namespace selftest {
30
31extern void text_art_box_drawing_cc_tests ();
32extern void text_art_canvas_cc_tests ();
33extern void text_art_ruler_cc_tests ();
34extern void text_art_style_cc_tests ();
35extern void text_art_styled_string_cc_tests ();
36extern void text_art_table_cc_tests ();
37extern void text_art_tree_widget_cc_tests ();
38extern void text_art_widget_cc_tests ();
39
40extern void text_art_tests ();
41
42extern void assert_canvas_streq (const location &loc,
43 const text_art::canvas &canvas,
44 pretty_printer *pp,
45 const char *expected_str);
46extern void assert_canvas_streq (const location &loc,
47 const text_art::canvas &canvas,
48 bool styled,
49 const char *expected_str);
50
51#define ASSERT_CANVAS_STREQ(CANVAS, STYLED, EXPECTED_STR) \
52 SELFTEST_BEGIN_STMT \
53 assert_canvas_streq ((SELFTEST_LOCATION), \
54 (CANVAS), \
55 (STYLED), \
56 (EXPECTED_STR)); \
57 SELFTEST_END_STMT
58
59} /* end of namespace selftest. */
60
61#endif /* #if CHECKING_P */
62
63#endif /* GCC_TEXT_ART_SELFTESTS_H */
Definition canvas.h:38
Definition dump-context.h:31
Definition diagnostics/context.h:56