File: no_failures.cpp

package info (click to toggle)
doctest 2.4.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,436 kB
  • sloc: cpp: 13,546; python: 261; makefile: 30; sh: 1
file content (13 lines) | stat: -rw-r--r-- 338 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <doctest/doctest.h>

TEST_CASE("no checks") {}

TEST_CASE("simple check") {
    CHECK(1 == 1);
}

TEST_SUITE("some suite") {
    TEST_CASE("fails - and its allowed" * doctest::may_fail()) { FAIL(""); }
}

TEST_CASE("should fail and no output" * doctest::should_fail() * doctest::no_breaks() * doctest::no_output()) { FAIL(""); }