#include <cstdlib>
#include <iostream>
#include <csignal>
Go to the source code of this file.
Macros | |
#define | BREAKPOINT() |
#define | WES_HALT() abort() |
#define | ERROR_LOG(a) |
#define | ASSERT_LOG(a, b) if (!(a)) { ERROR_LOG(b); } else (void)0 |
#define | FATAL_ERROR ERROR_LOG("FATAL ERROR") |
#define | UNREACHABLE_CODE ERROR_LOG("REACHED UNREACHABLE CODE") |
Marker for code that should be unreachable. More... | |
#define | ASSERT_OP(a, op, b) ASSERT_LOG((a) op (b), #a " " #op " " #b " (" << (a) << " " #op " " << (b) << ")") |
#define | ASSERT_EQ(a, b) ASSERT_OP(a,==,b) |
#define | ASSERT_NE(a, b) ASSERT_OP(a,!=,b) |
#define | ASSERT_GE(a, b) ASSERT_OP(a,>=,b) |
#define | ASSERT_LE(a, b) ASSERT_OP(a,<=,b) |
#define | ASSERT_GT(a, b) ASSERT_OP(a,>,b) |
#define | ASSERT_LT(a, b) ASSERT_OP(a,<,b) |
Definition at line 49 of file asserts.hpp.
Referenced by storyscreen::controller::controller(), gui2::get_control(), storyscreen::part_ui::prepare_background(), and storyscreen::controller::show().
#define ASSERT_OP | ( | a, | |
op, | |||
b | |||
) | ASSERT_LOG((a) op (b), #a " " #op " " #b " (" << (a) << " " #op " " << (b) << ")") |
Definition at line 61 of file asserts.hpp.
#define BREAKPOINT | ( | ) |
Definition at line 38 of file asserts.hpp.
#define ERROR_LOG | ( | a | ) |
Definition at line 42 of file asserts.hpp.
Referenced by gui2::policy::placement::tmatrix::calculate_best_size(), gui2::create_builder_widget(), gui2::policy::placement::tmatrix::create_item(), gui2::policy::placement::tmatrix::find_at(), gui2::get_control(), gui2::tgenerator< minimum_selection, maximum_selection, placement, select_action >::get_selected_item(), gui2::get_window_builder(), gui2::policy::placement::tmatrix::handle_key_down_arrow(), gui2::policy::placement::tmatrix::handle_key_left_arrow(), gui2::policy::placement::tmatrix::handle_key_right_arrow(), gui2::policy::placement::tmatrix::handle_key_up_arrow(), gui2::policy::placement::tmatrix::place(), gui2::policy::placement::tmatrix::set_origin(), and gui2::policy::placement::tmatrix::set_visible_rectangle().
#define FATAL_ERROR ERROR_LOG("FATAL ERROR") |
Definition at line 51 of file asserts.hpp.
#define UNREACHABLE_CODE ERROR_LOG("REACHED UNREACHABLE CODE") |
Marker for code that should be unreachable.
This can be used to avoid compiler warnings and to detect logic errors in the code.
Definition at line 58 of file asserts.hpp.
#define WES_HALT | ( | ) | abort() |
Definition at line 39 of file asserts.hpp.