test_outcome.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "crucible/test/outcome.hpp" #include "crucible/test/expect.hpp" #include "crucible/test/suite.hpp" namespace crucible::test::test_outcome { CRUCIBLE_SCENARIO(outcome, pass) { auto const pass { outcome::make_pass() }; CRUCIBLE_EXPECT(pass.passed()); CRUCIBLE_EXPECT_EQ(pass.get_details(), ""); } CRUCIBLE_SCENARIO(outcome, fail) { auto const fail { outcome::make_fail("you BROKE IT!!!") }; CRUCIBLE_EXPECT(fail.failed()); CRUCIBLE_EXPECT_EQ(fail.get_details(), "you BROKE IT!!!"); } }