Echo Writes Code

test_outcome.cpp

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

namespace test_outcome
{
  CRUCIBLE_SCENARIO(outcome, pass)
  {
    auto const pass { crucible::make_pass() };
    CRUCIBLE_EXPECT(pass.passed());
    CRUCIBLE_EXPECT_EQ(pass.get_details(), "");
  }

  CRUCIBLE_SCENARIO(outcome, fail)
  {
    auto const fail { crucible::make_fail("you BROKE IT!!!") };
    CRUCIBLE_EXPECT(fail.failed());
    CRUCIBLE_EXPECT_EQ(fail.get_details(), "you BROKE IT!!!");
  }
}

CRUCIBLE_BOOT(crucible::test::shell)