throw_if(true, std::runtime_error("whops!")) == 42
"whops!"
doctest::Approx(0.502) == 0.501
Approx( 0.502 ) == 0.501
throw_if(false, 0)
throw_if(true, 0)
"0"
char
throw_if(false, 0)
int
throw_if(true, "whops!")
"whops!"
whops! no match!
throw_if(true, "whops! does it match?")
"whops! does it match?"
whops! no match!
throw_if(true, "whops!")
"whops!"
bool
whops! no match!
throw_if(true, "whops!")
"whops!"
int
whops!
throw_if(true, "whops! does it match?")
"whops! does it match?"
int
whops! no match!
throw_if(true, 0)
"0"
throw_if(false, 0)
throw_if(false, std::runtime_error("whops!"))
std::exception
throw_if(true, std::runtime_error("whops!"))
"whops!"
int
throw_if(false, "")
whops!
throw_if(true, std::runtime_error("whops!"))
"whops!"
0
0
1
1
throw_if(false, 0)
throw_if(true, "")
whops!
throw_if(false, "")
whops!
throw_if(false, 0)
bool
throw_if(true, 0)
"0"
bool
throw_if(false, "")
int
whops!
throw_if(true, "")
int
whops!
throw_if(true, 0)
"0"
1, 0
1, 0
0
0
1
1
0
0
1
1
throw_if(false, 0)
throw_if(false, 0)
bool
throw_if(true, 0)
"0"
bool
throw_if(true, 0)
"0"
unrecognized
throw_if(true, 0)
"0"
int
unrecognized
throw_if(true, 0)
"0"
1, 0
1, 0
0
0
1
1
reached!
0
0
1
1
throw_if(false, 0)
throw_if(false, 0)
bool
throw_if(true, 0)
"0"
bool
throw_if(false, "")
whops!
throw_if(true, "")
whops!
throw_if(false, "")
bool
whops!
throw_if(true, "")
bool
whops!
throw_if(true, 0)
"0"
1, 0
1, 0
0
0
1
1
throw_if(true, false)
"unknown exception"
int
unknown exception
:D
:D
:D
:D
:D
:D
:D
:D
:D
a == b
4 == 2
a != b
4 != 2
a, b
4, 2
a == b
false
a != b
true
throw_if(false, false)
throw_if(true, 2)
"2"
doctest::Approx
throw_if(true, 2)
"2"
throw_if(true, 2)
"2"
1
Program code.