MCPcopy Create free account
hub / github.com/davisking/dlib / check_test

Function check_test

dlib/test/tester.cpp:37–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

errorClass · 0.85
strMethod · 0.45

Tested by

no test coverage detected