t/test.cc

filter: Statementstmt 100% 38 / 38 Branchbran 39.4% 82 / 208 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 48.7% 120 / 246 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« Catch.xs ↑ Summary Catch_xsgen.cc »
1 #include <catch2/catch_test_macros.hpp>
2 #include <string>
3  
4 3 TEST_CASE("a", "[single]") {
5 3 ▶ REQUIRE(1);
Branch: 6 branches
BranchTrueFalseTotal
REQUIRE(1); 3 0 3
REQUIRE(1); 3 0 3
REQUIRE(1); 3 0 3
REQUIRE(1); 3 0 3
REQUIRE(1); 0 0 0
REQUIRE(1); 0 0 0
6 3 }
7  
8 2 TEST_CASE("b", "[single]") {
9 2 ▶ REQUIRE(1);
Branch: 6 branches
BranchTrueFalseTotal
REQUIRE(1); 2 0 2
REQUIRE(1); 2 0 2
REQUIRE(1); 2 0 2
REQUIRE(1); 2 0 2
REQUIRE(1); 0 0 0
REQUIRE(1); 0 0 0
10 2 }
11  
12 2 TEST_CASE("c", "[single][s3]") {
13 2 ▶ REQUIRE(1);
Branch: 6 branches
BranchTrueFalseTotal
REQUIRE(1); 2 0 2
REQUIRE(1); 2 0 2
REQUIRE(1); 2 0 2
REQUIRE(1); 2 0 2
REQUIRE(1); 0 0 0
REQUIRE(1); 0 0 0
14 2 ▶ REQUIRE(1);
Branch: 6 branches
BranchTrueFalseTotal
REQUIRE(1); 2 0 2
REQUIRE(1); 2 0 2
REQUIRE(1); 2 0 2
REQUIRE(1); 2 0 2
REQUIRE(1); 0 0 0
REQUIRE(1); 0 0 0
15 2 ▶ REQUIRE(1);
Branch: 6 branches
BranchTrueFalseTotal
REQUIRE(1); 2 0 2
REQUIRE(1); 2 0 2
REQUIRE(1); 2 0 2
REQUIRE(1); 2 0 2
REQUIRE(1); 0 0 0
REQUIRE(1); 0 0 0
16 2 }
17  
18 6 TEST_CASE("d", "[multi]") {
19 6 ▶ SECTION("subtest1") {
Branch: 3 branches
BranchTrueFalseTotal
SECTION("subtest1") { 6 0 6
SECTION("subtest1") { 6 0 6
SECTION("subtest1") { 3 3 6
20 3 ▶ std::string s = "hello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello world";
Branch: 1 branch
BranchTrueFalseTotal
std::string s = "hello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello world"; 3 0 3
21 3 ▶ REQUIRE(s == "hello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello world");
Branch: 7 branches
BranchTrueFalseTotal
REQUIRE(s == "hello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello world"); 3 0 3
REQUIRE(s == "hello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello world"); 3 0 3
REQUIRE(s == "hello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello world"); 3 0 3
REQUIRE(s == "hello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello world"); 3 0 3
REQUIRE(s == "hello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello world"); 3 0 3
REQUIRE(s == "hello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello world"); 0 0 0
REQUIRE(s == "hello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello world"); 0 0 0
22 3 ▶ REQUIRE(1);
Branch: 6 branches
BranchTrueFalseTotal
REQUIRE(1); 3 0 3
REQUIRE(1); 3 0 3
REQUIRE(1); 3 0 3
REQUIRE(1); 3 0 3
REQUIRE(1); 0 0 0
REQUIRE(1); 0 0 0
23 9 }
24 6 ▶ SECTION("subtest2") {
Branch: 3 branches
BranchTrueFalseTotal
SECTION("subtest2") { 6 0 6
SECTION("subtest2") { 6 0 6
SECTION("subtest2") { 3 3 6
25 3 ▶ REQUIRE(1);
Branch: 6 branches
BranchTrueFalseTotal
REQUIRE(1); 3 0 3
REQUIRE(1); 3 0 3
REQUIRE(1); 3 0 3
REQUIRE(1); 3 0 3
REQUIRE(1); 0 0 0
REQUIRE(1); 0 0 0
26 6 }
27 6 }
28  
29 9 TEST_CASE("e", "[multi]") {
30 static int cnt = 0;
31 9 ++cnt;
32 9 ▶ REQUIRE(cnt);
Branch: 6 branches
BranchTrueFalseTotal
REQUIRE(cnt); 9 0 9
REQUIRE(cnt); 9 0 9
REQUIRE(cnt); 9 0 9
REQUIRE(cnt); 9 0 9
REQUIRE(cnt); 0 0 0
REQUIRE(cnt); 0 0 0
33 9 ▶ SECTION("subtest1") {
Branch: 3 branches
BranchTrueFalseTotal
SECTION("subtest1") { 9 0 9
SECTION("subtest1") { 9 0 9
SECTION("subtest1") { 6 3 9
34 6 ▶ SECTION("sst1") {
Branch: 3 branches
BranchTrueFalseTotal
SECTION("sst1") { 6 0 6
SECTION("sst1") { 6 0 6
SECTION("sst1") { 3 3 6
35 3 ▶ REQUIRE(cnt);
Branch: 6 branches
BranchTrueFalseTotal
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 0 0 0
REQUIRE(cnt); 0 0 0
36 6 }
37 6 ▶ SECTION("sst2") {
Branch: 3 branches
BranchTrueFalseTotal
SECTION("sst2") { 6 0 6
SECTION("sst2") { 6 0 6
SECTION("sst2") { 3 3 6
38 3 ▶ REQUIRE(cnt);
Branch: 6 branches
BranchTrueFalseTotal
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 0 0 0
REQUIRE(cnt); 0 0 0
39 6 }
40 9 }
41 9 ▶ SECTION("subtest2") {
Branch: 3 branches
BranchTrueFalseTotal
SECTION("subtest2") { 9 0 9
SECTION("subtest2") { 9 0 9
SECTION("subtest2") { 3 6 9
42 3 ▶ REQUIRE(cnt);
Branch: 6 branches
BranchTrueFalseTotal
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 0 0 0
REQUIRE(cnt); 0 0 0
43 3 ▶ REQUIRE(cnt);
Branch: 6 branches
BranchTrueFalseTotal
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 3 0 3
REQUIRE(cnt); 0 0 0
REQUIRE(cnt); 0 0 0
44 9 }
45 9 ▶ REQUIRE(cnt);
Branch: 6 branches
BranchTrueFalseTotal
REQUIRE(cnt); 9 0 9
REQUIRE(cnt); 9 0 9
REQUIRE(cnt); 9 0 9
REQUIRE(cnt); 9 0 9
REQUIRE(cnt); 0 0 0
REQUIRE(cnt); 0 0 0
46 9 }
« Catch.xs ↑ Summary Catch_xsgen.cc »