GCC Code Coverage Report


Directory: src/
File: lib_resources/doc_examples/examples.cpp
Date: 2024-12-30 15:39:09
Exec Total Coverage
Lines: 9 10 90.0%
Functions: 2 2 100.0%
Branches: 6 12 50.0%

Line Branch Exec Source
1 #include "text_conversion.h"
2 #include <cstdlib>
3 #include <iostream>
4
5 1 auto base_example()
6 {
7 // [basic_example]
8
9
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
1 std::string text{"this is a headline"};
10
11
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 text_conversion::convert_to_title_case(text);
12
13
2/4
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
1 std::cout << text << std::endl;
14
15 // [basic_example]
16
17
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
2 return text == std::string{"This Is a Headline"};
18 1 }
19
20 1 int main()
21 {
22
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 times.
1 if (!base_example())
23 return EXIT_FAILURE;
24
25 1 return EXIT_SUCCESS;
26 }
27