| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include <tuple> | ||
| 4 | #include <utility> | ||
| 5 | #include <vector> | ||
| 6 | |||
| 7 | #include "task/include/task.hpp" | ||
| 8 | |||
| 9 | namespace iskhakov_d_linear_topology { | ||
| 10 | |||
| 11 |
9/14✓ Branch 0 taken 30 times.
✓ Branch 1 taken 14 times.
✓ Branch 3 taken 32 times.
✓ Branch 4 taken 896 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 16 times.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✓ Branch 9 taken 12 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 4104 times.
✗ Branch 13 not taken.
✓ Branch 16 taken 12 times.
✓ Branch 17 taken 16 times.
|
7188 | struct Message { |
| 12 | int head_process = 0; | ||
| 13 | int tail_process = 0; | ||
| 14 | bool delivered = false; | ||
| 15 | std::vector<int> data; | ||
| 16 | |||
| 17 | [[nodiscard]] int DataSize() const { | ||
| 18 | 1344 | return static_cast<int>(data.size()); | |
| 19 | } | ||
| 20 | |||
| 21 | void SetData(const std::vector<int> &new_data) { | ||
| 22 |
1/2✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
|
24 | data = new_data; |
| 23 | 16 | } | |
| 24 | |||
| 25 | void SetData(std::vector<int> &&new_data) { | ||
| 26 | 904 | data = std::move(new_data); | |
| 27 | } | ||
| 28 | }; | ||
| 29 | |||
| 30 | using InType = Message; | ||
| 31 | using OutType = Message; | ||
| 32 | using TestType = std::tuple<InType, OutType>; | ||
| 33 | using BaseTask = ppc::task::Task<InType, OutType>; | ||
| 34 | |||
| 35 | } // namespace iskhakov_d_linear_topology | ||
| 36 |