GCC Code Coverage Report


Directory: ./
File: tasks/mityaeva_radix/common/include/test_generator.hpp
Date: 2026-05-11 08:26:31
Exec Total Coverage
Lines: 6 6 100.0%
Functions: 1 1 100.0%
Branches: 4 8 50.0%

Line Branch Exec Source
1 #pragma once
2
3 #include <cstddef>
4 #include <random>
5 #include <vector>
6
7 namespace mityaeva_radix {
8
9 312 inline std::vector<double> GenerateTest(std::size_t length, std::size_t seed) {
10 312 std::vector<double> input;
11
1/2
✓ Branch 1 taken 312 times.
✗ Branch 2 not taken.
312 input.reserve(length);
12 std::mt19937_64 rng(seed);
13 std::uniform_real_distribution<double> dist(0.0, 1.0);
14
2/2
✓ Branch 0 taken 14508 times.
✓ Branch 1 taken 312 times.
14820 for (size_t i = 0; i < length; i++) {
15
1/4
✓ Branch 1 taken 14508 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
14508 input.push_back(dist(rng) - 0.5);
16 }
17
18 312 return input;
19 };
20
21 } // namespace mityaeva_radix
22