line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#include |
2
|
|
|
|
|
|
|
#include |
3
|
|
|
|
|
|
|
#include |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
using namespace panda; |
6
|
|
|
|
|
|
|
|
7
|
19
|
|
|
|
|
|
TEST_CASE("bool_or", "[traits]") { |
8
|
|
|
|
|
|
|
struct N {}; |
9
|
|
|
|
|
|
|
|
10
|
1
|
50
|
|
|
|
|
REQUIRE(bool_or(nullptr, true) == false); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
11
|
1
|
50
|
|
|
|
|
REQUIRE(bool_or(1, false) == true); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
12
|
1
|
50
|
|
|
|
|
REQUIRE(bool_or(string(""), true) == false); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
13
|
1
|
50
|
|
|
|
|
REQUIRE(bool_or(string("1"), false) == true); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
1
|
50
|
|
|
|
|
REQUIRE(bool_or(N{}, true) == true); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
16
|
1
|
50
|
|
|
|
|
REQUIRE(bool_or(N{}, false) == false); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
|
|
|
int a = 1; |
19
|
1
|
|
|
|
|
|
int& ref = a; |
20
|
1
|
50
|
|
|
|
|
REQUIRE(bool_or(ref, false) == true); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
|
|
|
string s; |
23
|
1
|
|
|
|
|
|
string& sref = s; |
24
|
1
|
50
|
|
|
|
|
REQUIRE(bool_or(sref, true) == false); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
25
|
1
|
50
|
|
|
|
|
s = "123"; |
26
|
1
|
50
|
|
|
|
|
REQUIRE(bool_or(sref, false) == true); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
N n; |
29
|
1
|
|
|
|
|
|
N& nref = n; |
30
|
1
|
50
|
|
|
|
|
REQUIRE(bool_or(nref, true) == true); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
31
|
1
|
50
|
|
|
|
|
REQUIRE(bool_or(nref, false) == false); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
32
|
73
|
50
|
|
|
|
|
} |
|
|
50
|
|
|
|
|
|