Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
030-Asn-Require-Check.cpp File Reference
#include <catch2/catch.hpp>
Include dependency graph for 030-Asn-Require-Check.cpp:

Go to the source code of this file.

Functions

std::string one ()
 
 TEST_CASE ("Assert that something is true (pass)", "[require]")
 
 TEST_CASE ("Assert that something is true (fail)", "[require]")
 
 TEST_CASE ("Assert that something is true (stop at first failure)", "[require]")
 
 TEST_CASE ("Assert that something is true (continue after failure)", "[check]")
 
 TEST_CASE ("Assert that something is false (stops at first failure)", "[require-false]")
 
 TEST_CASE ("Assert that something is false (continue after failure)", "[check-false]")
 

Function Documentation

◆ one()

std::string one ( )

Definition at line 15 of file 030-Asn-Require-Check.cpp.

15 {
16 return "1";
17}
Here is the caller graph for this function:

◆ TEST_CASE() [1/6]

TEST_CASE ( "Assert that something is false (continue after failure)" ,
"" [check-false] )

Definition at line 48 of file 030-Asn-Require-Check.cpp.

48 {
49 WARN( "CHECK_FALSE continues after failure:" );
50
51 CHECK_FALSE( one() == "1" );
52 REQUIRE_FALSE( one() != "1" );
53}
std::string one()
#define WARN(msg)
Definition catch.hpp:219
#define CHECK_FALSE(...)
Definition catch.hpp:197
#define REQUIRE_FALSE(...)
Definition catch.hpp:186
Here is the call graph for this function:

◆ TEST_CASE() [2/6]

TEST_CASE ( "Assert that something is false (stops at first failure)" ,
"" [require-false] )

Definition at line 41 of file 030-Asn-Require-Check.cpp.

41 {
42 WARN( "REQUIRE_FALSE stops at first failure:" );
43
44 REQUIRE_FALSE( one() == "1" );
45 REQUIRE_FALSE( one() != "1" );
46}
Here is the call graph for this function:

◆ TEST_CASE() [3/6]

TEST_CASE ( "Assert that something is true (continue after failure)" ,
"" [check] )

Definition at line 34 of file 030-Asn-Require-Check.cpp.

34 {
35 WARN( "CHECK continues after failure:" );
36
37 CHECK( one() == "x" );
38 REQUIRE( one() == "1" );
39}
#define CHECK(cond)
Definition util.h:80
#define REQUIRE(...)
Definition catch.hpp:185
Here is the call graph for this function:

◆ TEST_CASE() [4/6]

TEST_CASE ( "Assert that something is true (fail)" ,
"" [require] )

Definition at line 23 of file 030-Asn-Require-Check.cpp.

23 {
24 REQUIRE( one() == "x" );
25}
Here is the call graph for this function:

◆ TEST_CASE() [5/6]

TEST_CASE ( "Assert that something is true (pass)" ,
"" [require] )

Definition at line 19 of file 030-Asn-Require-Check.cpp.

19 {
20 REQUIRE( one() == "1" );
21}
Here is the call graph for this function:

◆ TEST_CASE() [6/6]

TEST_CASE ( "Assert that something is true (stop at first failure)" ,
"" [require] )

Definition at line 27 of file 030-Asn-Require-Check.cpp.

27 {
28 WARN( "REQUIRE stops at first failure:" );
29
30 REQUIRE( one() == "x" );
31 REQUIRE( one() == "1" );
32}
Here is the call graph for this function: