doctest

FORK: The fastest feature-rich C++11/14/17/20 single-header testing framework
git clone https://git.neptards.moe/neptards/doctest.git
Log | Files | Refs | README

no_failures.cpp (338B)


      1 #include <doctest/doctest.h>
      2 
      3 TEST_CASE("no checks") {}
      4 
      5 TEST_CASE("simple check") {
      6     CHECK(1 == 1);
      7 }
      8 
      9 TEST_SUITE("some suite") {
     10     TEST_CASE("fails - and its allowed" * doctest::may_fail()) { FAIL(""); }
     11 }
     12 
     13 TEST_CASE("should fail and no output" * doctest::should_fail() * doctest::no_breaks() * doctest::no_output()) { FAIL(""); }