| 35 | // ----------------------------------------------------------------------------- |
| 36 | |
| 37 | void check_test ( |
| 38 | bool _exp, |
| 39 | long line, |
| 40 | const char* file, |
| 41 | const char* _exp_str |
| 42 | ) |
| 43 | { |
| 44 | ++test_count; |
| 45 | if ( !(_exp) ) |
| 46 | { |
| 47 | std::ostringstream dlib_o_out; |
| 48 | dlib_o_out << "\n\nError occurred at line " << line << ".\n"; |
| 49 | dlib_o_out << "Error occurred in file " << file << ".\n"; |
| 50 | dlib_o_out << "Failing expression was " << _exp_str << ".\n"; |
| 51 | throw dlib::error(dlib_o_out.str()); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | // ----------------------------------------------------------------------------- |
| 56 | |