fork download
  1. SCENARIO("whatever") {
  2. GIVEN("a foo") {
  3. foo f;
  4. WHEN("bar equals 42") {
  5. f.bar = 42;
  6. THEN("baz is true") {
  7. REQUIRE(f.baz);
  8. }
  9. }
  10. }
  11. }
  12.  
  13. // if it fails, the test uses the GIVEN/WHEN/THEN macros to provide a
  14. // more human-readable description of the failure
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:9: error: expected constructor, destructor, or type conversion before ‘(’ token
 SCENARIO("whatever") {
         ^
stdout
Standard output is empty