GCC Code Coverage Report


Directory: ./
File: tasks/example/common/include/common.hpp
Date: 2026-08-18 01:54:56
Exec Total Coverage
Lines: 1 1 100.0%
Functions: 0 0 -%
Branches: 15 30 50.0%

Line Branch Exec Source
1 #pragma once
2
3 #include <string>
4 #include <string_view>
5 #include <utility>
6
7 #include "task/include/task.hpp"
8
9 namespace example_common {
10
11 using InType = int;
12 using OutType = int;
13
15/30
✗ Branch 0 not taken.
✓ Branch 1 taken 112 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 112 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 112 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 112 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 112 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 112 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 28 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 28 times.
✗ Branch 16 not taken.
✓ Branch 17 taken 28 times.
✗ Branch 18 not taken.
✓ Branch 19 taken 28 times.
✗ Branch 20 not taken.
✓ Branch 21 taken 28 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 28 times.
✗ Branch 24 not taken.
✓ Branch 25 taken 28 times.
✗ Branch 26 not taken.
✓ Branch 27 taken 28 times.
✗ Branch 28 not taken.
✓ Branch 29 taken 28 times.
924 struct TestCase {
14 int value;
15 std::string name;
16 };
17
18 using TestType = TestCase;
19
20 template <ppc::task::TypeOfTask kTaskType>
21 class BaseTask : public ppc::task::Task<InType, OutType> {
22 public:
23 explicit BaseTask(InType input) : ppc::task::Task<InType, OutType>(std::move(input), kTaskType) {}
24
25 static constexpr ppc::task::TypeOfTask GetStaticTypeOfTask() {
26 return kTaskType;
27 }
28 };
29
30 } // namespace example_common
31
32 namespace example_threads {
33
34 using example_common::InType;
35 using example_common::OutType;
36 using example_common::TestType;
37
38 template <ppc::task::TypeOfTask kTaskType>
39 class BaseTask : public example_common::BaseTask<kTaskType> {
40 public:
41 using example_common::BaseTask<kTaskType>::BaseTask;
42
43 static constexpr std::string_view GetTaskIdentifier() {
44 return "example_threads";
45 }
46 };
47
48 } // namespace example_threads
49
50 namespace example_processes_t1 {
51
52 using example_common::InType;
53 using example_common::OutType;
54 using example_common::TestType;
55
56 template <ppc::task::TypeOfTask kTaskType>
57 class BaseTask : public example_common::BaseTask<kTaskType> {
58 public:
59 using example_common::BaseTask<kTaskType>::BaseTask;
60
61 static constexpr std::string_view GetTaskIdentifier() {
62 return "example_processes_t1";
63 }
64 };
65
66 } // namespace example_processes_t1
67
68 namespace example_processes_t2 {
69
70 using example_common::InType;
71 using example_common::OutType;
72 using example_common::TestType;
73
74 template <ppc::task::TypeOfTask kTaskType>
75 class BaseTask : public example_common::BaseTask<kTaskType> {
76 public:
77 using example_common::BaseTask<kTaskType>::BaseTask;
78
79 static constexpr std::string_view GetTaskIdentifier() {
80 return "example_processes_t2";
81 }
82 };
83
84 } // namespace example_processes_t2
85
86 namespace example_processes_t3 {
87
88 using example_common::InType;
89 using example_common::OutType;
90 using example_common::TestType;
91
92 template <ppc::task::TypeOfTask kTaskType>
93 class BaseTask : public example_common::BaseTask<kTaskType> {
94 public:
95 using example_common::BaseTask<kTaskType>::BaseTask;
96
97 static constexpr std::string_view GetTaskIdentifier() {
98 return "example_processes_t3";
99 }
100 };
101
102 } // namespace example_processes_t3
103