blob: 0d283c8e552fdf2f0796f6b48fa4d2ffa1810283 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <specs/specs.h>
namespace bd = bandit::detail;
go_bandit([](){
describe("Visual Studio failure formatter:", [&](){
bd::visual_studio_failure_formatter formatter;
it("formats assertions with file and line number", [&](){
bd::assertion_exception exception("message", "file", 321);
AssertThat(formatter.format(exception), Equals("file(321): message"));
});
it("formats assertions without file and line number", [&](){
bd::assertion_exception exception("message");
AssertThat(formatter.format(exception), Equals("bandit: message"));
});
});
});
|