blob: 6ff3fdeb80a20b12566daddc3ccca58e85b4fe7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#ifndef BANDIT_VISUAL_STUDIO_FAILURE_FORMATTER_H
#define BANDIT_VISUAL_STUDIO_FAILURE_FORMATTER_H
namespace bandit { namespace detail {
struct visual_studio_failure_formatter : public failure_formatter
{
std::string format(const assertion_exception& err) const
{
std::stringstream ss;
if(err.file_name().size())
{
ss << err.file_name();
if(err.line_number())
{
ss << "(" << err.line_number() << ")";
}
ss << ": ";
}
else
{
ss << "bandit: ";
}
ss << err.what();
return ss.str();
}
};
}}
#endif
|