Echo Writes Code

test_outcome.cpp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "crucible/testing/outcome.hpp"

#include "crucible/testing/expect.inl"
#include "crucible/testing/suite.inl"

namespace crucible::testing::test_outcome {
  SCENARIO(outcome, pass) {
    auto const pass { outcome::make_pass() };
    EXPECT(pass.passed());
    EXPECT_EQ(pass.get_details(), "");
  }

  SCENARIO(outcome, fail) {
    auto const fail { outcome::make_fail("you BROKE IT!!!") };
    EXPECT(fail.failed());
    EXPECT_EQ(fail.get_details(), "you BROKE IT!!!");
  }
}