|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Comprehensive tests for ah-errors.H exception handling macros. More...
#include <iostream>#include <sstream>#include <cassert>#include <stdexcept>#include <string>#include "../ah-errors.H"Go to the source code of this file.
Macros | |
| #define | TEST_EXCEPTION(exception_type, code, should_throw) |
Functions | |
| void | test_range_error_if () |
| void | test_range_error_unless () |
| void | test_range_error () |
| void | test_runtime_error_if () |
| void | test_runtime_error_unless () |
| void | test_runtime_error () |
| void | test_logic_error_if () |
| void | test_logic_error_unless () |
| void | test_logic_error () |
| void | test_underflow_error_if () |
| void | test_underflow_error_unless () |
| void | test_underflow_error () |
| void | test_overflow_error_if () |
| void | test_overflow_error_unless () |
| void | test_overflow_error () |
| void | test_domain_error_if () |
| void | test_domain_error_unless () |
| void | test_domain_error () |
| void | test_out_of_range_error_if () |
| void | test_out_of_range_error_unless () |
| void | test_out_of_range_error () |
| void | test_invalid_argument_if () |
| void | test_invalid_argument_unless () |
| void | test_invalid_argument () |
| void | test_length_error_if () |
| void | test_length_error_unless () |
| void | test_length_error () |
| void | test_fatal_error () |
| void | test_warning_macros () |
| void | test_message_formatting () |
| int | main () |
Variables | |
| int | tests_passed = 0 |
| int | tests_failed = 0 |
Comprehensive tests for ah-errors.H exception handling macros.
Definition in file test_ah_errors.cc.
| #define TEST_EXCEPTION | ( | exception_type, | |
| code, | |||
| should_throw | |||
| ) |
Definition at line 21 of file test_ah_errors.cc.
| int main | ( | ) |
Definition at line 501 of file test_ah_errors.cc.
References test_domain_error(), test_domain_error_if(), test_domain_error_unless(), test_fatal_error(), test_invalid_argument(), test_invalid_argument_if(), test_invalid_argument_unless(), test_length_error(), test_length_error_if(), test_length_error_unless(), test_logic_error(), test_logic_error_if(), test_logic_error_unless(), test_message_formatting(), test_out_of_range_error(), test_out_of_range_error_if(), test_out_of_range_error_unless(), test_overflow_error(), test_overflow_error_if(), test_overflow_error_unless(), test_range_error(), test_range_error_if(), test_range_error_unless(), test_runtime_error(), test_runtime_error_if(), test_runtime_error_unless(), test_underflow_error(), test_underflow_error_if(), test_underflow_error_unless(), test_warning_macros(), tests_failed, and tests_passed.
| void test_domain_error | ( | ) |
Definition at line 286 of file test_ah_errors.cc.
References ah_domain_error, and TEST_EXCEPTION.
Referenced by main().
| void test_domain_error_if | ( | ) |
Definition at line 260 of file test_ah_errors.cc.
References ah_domain_error_if, and TEST_EXCEPTION.
Referenced by main().
| void test_domain_error_unless | ( | ) |
Definition at line 273 of file test_ah_errors.cc.
References ah_domain_error_unless, and TEST_EXCEPTION.
Referenced by main().
| void test_fatal_error | ( | ) |
Definition at line 416 of file test_ah_errors.cc.
References ah_fatal_error, and TEST_EXCEPTION.
Referenced by main().
| void test_invalid_argument | ( | ) |
Definition at line 364 of file test_ah_errors.cc.
References ah_invalid_argument, and TEST_EXCEPTION.
Referenced by main().
| void test_invalid_argument_if | ( | ) |
Definition at line 338 of file test_ah_errors.cc.
References ah_invalid_argument_if, and TEST_EXCEPTION.
Referenced by main().
| void test_invalid_argument_unless | ( | ) |
Definition at line 351 of file test_ah_errors.cc.
References ah_invalid_argument_unless, and TEST_EXCEPTION.
Referenced by main().
| void test_length_error | ( | ) |
Definition at line 403 of file test_ah_errors.cc.
References ah_length_error, and TEST_EXCEPTION.
Referenced by main().
| void test_length_error_if | ( | ) |
Definition at line 377 of file test_ah_errors.cc.
References ah_length_error_if, and TEST_EXCEPTION.
Referenced by main().
| void test_length_error_unless | ( | ) |
Definition at line 390 of file test_ah_errors.cc.
References ah_length_error_unless, and TEST_EXCEPTION.
Referenced by main().
| void test_logic_error | ( | ) |
Definition at line 169 of file test_ah_errors.cc.
References ah_logic_error, and TEST_EXCEPTION.
Referenced by main().
| void test_logic_error_if | ( | ) |
Definition at line 143 of file test_ah_errors.cc.
References ah_logic_error_if, and TEST_EXCEPTION.
Referenced by main().
| void test_logic_error_unless | ( | ) |
Definition at line 156 of file test_ah_errors.cc.
References ah_logic_error_unless, and TEST_EXCEPTION.
Referenced by main().
| void test_message_formatting | ( | ) |
Definition at line 479 of file test_ah_errors.cc.
References ah_range_error, tests_failed, and tests_passed.
Referenced by main().
| void test_out_of_range_error | ( | ) |
Definition at line 325 of file test_ah_errors.cc.
References ah_out_of_range_error, and TEST_EXCEPTION.
Referenced by main().
| void test_out_of_range_error_if | ( | ) |
Definition at line 299 of file test_ah_errors.cc.
References ah_out_of_range_error_if, and TEST_EXCEPTION.
Referenced by main().
| void test_out_of_range_error_unless | ( | ) |
Definition at line 312 of file test_ah_errors.cc.
References ah_out_of_range_error_unless, and TEST_EXCEPTION.
Referenced by main().
| void test_overflow_error | ( | ) |
Definition at line 247 of file test_ah_errors.cc.
References ah_overflow_error, and TEST_EXCEPTION.
Referenced by main().
| void test_overflow_error_if | ( | ) |
Definition at line 221 of file test_ah_errors.cc.
References ah_overflow_error_if, and TEST_EXCEPTION.
Referenced by main().
| void test_overflow_error_unless | ( | ) |
Definition at line 234 of file test_ah_errors.cc.
References ah_overflow_error_unless, and TEST_EXCEPTION.
Referenced by main().
| void test_range_error | ( | ) |
Definition at line 90 of file test_ah_errors.cc.
References ah_range_error, and TEST_EXCEPTION.
Referenced by main().
| void test_range_error_if | ( | ) |
Definition at line 60 of file test_ah_errors.cc.
References ah_range_error_if, and TEST_EXCEPTION.
Referenced by main().
| void test_range_error_unless | ( | ) |
Definition at line 75 of file test_ah_errors.cc.
References ah_range_error_unless, and TEST_EXCEPTION.
Referenced by main().
| void test_runtime_error | ( | ) |
Definition at line 130 of file test_ah_errors.cc.
References ah_runtime_error, and TEST_EXCEPTION.
Referenced by main().
| void test_runtime_error_if | ( | ) |
Definition at line 104 of file test_ah_errors.cc.
References ah_runtime_error_if, and TEST_EXCEPTION.
Referenced by main().
| void test_runtime_error_unless | ( | ) |
Definition at line 117 of file test_ah_errors.cc.
References ah_runtime_error_unless, and TEST_EXCEPTION.
Referenced by main().
| void test_underflow_error | ( | ) |
Definition at line 208 of file test_ah_errors.cc.
References ah_underflow_error, and TEST_EXCEPTION.
Referenced by main().
| void test_underflow_error_if | ( | ) |
Definition at line 182 of file test_ah_errors.cc.
References ah_underflow_error_if, and TEST_EXCEPTION.
Referenced by main().
| void test_underflow_error_unless | ( | ) |
Definition at line 195 of file test_ah_errors.cc.
References ah_underflow_error_unless, and TEST_EXCEPTION.
Referenced by main().
| void test_warning_macros | ( | ) |
Definition at line 429 of file test_ah_errors.cc.
References ah_warning, ah_warning_if, ah_warning_unless, tests_failed, and tests_passed.
Referenced by main().
| int tests_failed = 0 |
Definition at line 18 of file test_ah_errors.cc.
Referenced by main(), test_message_formatting(), and test_warning_macros().
| int tests_passed = 0 |
Definition at line 17 of file test_ah_errors.cc.
Referenced by main(), test_message_formatting(), and test_warning_macros().