Coverage Report

Created: 2026-08-14 17:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/root/bitcoin/src/test/fuzz/vecdeque.cpp
Line
Count
Source
1
// Copyright (c) The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#include <random.h>
6
#include <span.h>
7
#include <test/fuzz/util.h>
8
#include <util/vecdeque.h>
9
10
#include <cstdint>
11
#include <deque>
12
13
namespace {
14
15
/** The maximum number of simultaneous buffers kept by the test. */
16
static constexpr size_t MAX_BUFFERS{3};
17
/** How many elements are kept in a buffer at most. */
18
static constexpr size_t MAX_BUFFER_SIZE{48};
19
/** How many operations are performed at most on the buffers in one test. */
20
static constexpr size_t MAX_OPERATIONS{1024};
21
22
/** Perform a simulation fuzz test on VecDeque type T.
23
 *
24
 * T must be constructible from a uint64_t seed, comparable to other T, copyable, and movable.
25
 */
26
template<typename T, bool CheckNoneLeft>
27
void TestType(std::span<const uint8_t> buffer, uint64_t rng_tweak)
28
0
{
29
0
    FuzzedDataProvider provider(buffer.data(), buffer.size());
30
    // Local RNG, only used for the seeds to initialize T objects with.
31
0
    InsecureRandomContext rng(provider.ConsumeIntegral<uint64_t>() ^ rng_tweak);
32
33
    // Real circular buffers.
34
0
    std::vector<VecDeque<T>> real;
35
0
    real.reserve(MAX_BUFFERS);
36
    // Simulated circular buffers.
37
0
    std::vector<std::deque<T>> sim;
38
0
    sim.reserve(MAX_BUFFERS);
39
    // Temporary object of type T.
40
0
    std::optional<T> tmp;
41
42
    // Compare a real and a simulated buffer.
43
0
    auto compare_fn = [](const VecDeque<T>& r, const std::deque<T>& s) {
44
0
        assert(r.size() == s.size());
  Branch (44:9): [True: 0, False: 0]
  Branch (44:9): [True: 0, False: 0]
  Branch (44:9): [True: 0, False: 0]
  Branch (44:9): [True: 0, False: 0]
  Branch (44:9): [True: 0, False: 0]
  Branch (44:9): [True: 0, False: 0]
  Branch (44:9): [True: 0, False: 0]
45
0
        assert(r.empty() == s.empty());
  Branch (45:9): [True: 0, False: 0]
  Branch (45:9): [True: 0, False: 0]
  Branch (45:9): [True: 0, False: 0]
  Branch (45:9): [True: 0, False: 0]
  Branch (45:9): [True: 0, False: 0]
  Branch (45:9): [True: 0, False: 0]
  Branch (45:9): [True: 0, False: 0]
46
0
        assert(r.capacity() >= r.size());
  Branch (46:9): [True: 0, False: 0]
  Branch (46:9): [True: 0, False: 0]
  Branch (46:9): [True: 0, False: 0]
  Branch (46:9): [True: 0, False: 0]
  Branch (46:9): [True: 0, False: 0]
  Branch (46:9): [True: 0, False: 0]
  Branch (46:9): [True: 0, False: 0]
47
0
        if (s.size() == 0) return;
  Branch (47:13): [True: 0, False: 0]
  Branch (47:13): [True: 0, False: 0]
  Branch (47:13): [True: 0, False: 0]
  Branch (47:13): [True: 0, False: 0]
  Branch (47:13): [True: 0, False: 0]
  Branch (47:13): [True: 0, False: 0]
  Branch (47:13): [True: 0, False: 0]
48
0
        assert(r.front() == s.front());
  Branch (48:9): [True: 0, False: 0]
  Branch (48:9): [True: 0, False: 0]
  Branch (48:9): [True: 0, False: 0]
  Branch (48:9): [True: 0, False: 0]
  Branch (48:9): [True: 0, False: 0]
  Branch (48:9): [True: 0, False: 0]
  Branch (48:9): [True: 0, False: 0]
49
0
        assert(r.back() == s.back());
  Branch (49:9): [True: 0, False: 0]
  Branch (49:9): [True: 0, False: 0]
  Branch (49:9): [True: 0, False: 0]
  Branch (49:9): [True: 0, False: 0]
  Branch (49:9): [True: 0, False: 0]
  Branch (49:9): [True: 0, False: 0]
  Branch (49:9): [True: 0, False: 0]
50
0
        for (size_t i = 0; i < s.size(); ++i) {
  Branch (50:28): [True: 0, False: 0]
  Branch (50:28): [True: 0, False: 0]
  Branch (50:28): [True: 0, False: 0]
  Branch (50:28): [True: 0, False: 0]
  Branch (50:28): [True: 0, False: 0]
  Branch (50:28): [True: 0, False: 0]
  Branch (50:28): [True: 0, False: 0]
51
0
            assert(r[i] == s[i]);
  Branch (51:13): [True: 0, False: 0]
  Branch (51:13): [True: 0, False: 0]
  Branch (51:13): [True: 0, False: 0]
  Branch (51:13): [True: 0, False: 0]
  Branch (51:13): [True: 0, False: 0]
  Branch (51:13): [True: 0, False: 0]
  Branch (51:13): [True: 0, False: 0]
52
0
        }
53
0
    };
Unexecuted instantiation: vecdeque.cpp:_ZZN12_GLOBAL__N_18TestTypeIhLb0EEEvSt4spanIKhLm18446744073709551615EEmENKUlRK8VecDequeIhERKSt5dequeIhSaIhEEE_clES7_SC_
Unexecuted instantiation: vecdeque.cpp:_ZZN12_GLOBAL__N_18TestTypeItLb0EEEvSt4spanIKhLm18446744073709551615EEmENKUlRK8VecDequeItERKSt5dequeItSaItEEE_clES7_SC_
Unexecuted instantiation: vecdeque.cpp:_ZZN12_GLOBAL__N_18TestTypeIjLb0EEEvSt4spanIKhLm18446744073709551615EEmENKUlRK8VecDequeIjERKSt5dequeIjSaIjEEE_clES7_SC_
Unexecuted instantiation: vecdeque.cpp:_ZZN12_GLOBAL__N_18TestTypeImLb0EEEvSt4spanIKhLm18446744073709551615EEmENKUlRK8VecDequeImERKSt5dequeImSaImEEE_clES7_SC_
Unexecuted instantiation: vecdeque.cpp:_ZZN12_GLOBAL__N_18TestTypeINS_10TrackedObjILm1EEELb1EEEvSt4spanIKhLm18446744073709551615EEmENKUlRK8VecDequeIS2_ERKSt5dequeIS2_SaIS2_EEE_clES9_SE_
Unexecuted instantiation: vecdeque.cpp:_ZZN12_GLOBAL__N_18TestTypeINS_10TrackedObjILm3EEELb1EEEvSt4spanIKhLm18446744073709551615EEmENKUlRK8VecDequeIS2_ERKSt5dequeIS2_SaIS2_EEE_clES9_SE_
Unexecuted instantiation: vecdeque.cpp:_ZZN12_GLOBAL__N_18TestTypeINS_10TrackedObjILm17EEELb1EEEvSt4spanIKhLm18446744073709551615EEmENKUlRK8VecDequeIS2_ERKSt5dequeIS2_SaIS2_EEE_clES9_SE_
54
55
0
    LIMITED_WHILE (provider.remaining_bytes(), MAX_OPERATIONS) {
56
0
        int command = provider.ConsumeIntegral<uint8_t>() % 64;
57
0
        unsigned idx = real.empty() ? 0 : provider.ConsumeIntegralInRange<unsigned>(0, real.size() - 1);
  Branch (57:24): [True: 0, False: 0]
  Branch (57:24): [True: 0, False: 0]
  Branch (57:24): [True: 0, False: 0]
  Branch (57:24): [True: 0, False: 0]
  Branch (57:24): [True: 0, False: 0]
  Branch (57:24): [True: 0, False: 0]
  Branch (57:24): [True: 0, False: 0]
58
0
        const size_t num_buffers = sim.size();
59
        // Pick one operation based on value of command. Not all operations are always applicable.
60
        // Loop through the applicable ones until command reaches 0 (which avoids the need to
61
        // compute the number of applicable commands ahead of time).
62
0
        const bool non_empty{num_buffers != 0};
63
0
        const bool non_full{num_buffers < MAX_BUFFERS};
64
0
        const bool partially_full{non_empty && non_full};
  Branch (64:35): [True: 0, False: 0]
  Branch (64:48): [True: 0, False: 0]
  Branch (64:35): [True: 0, False: 0]
  Branch (64:48): [True: 0, False: 0]
  Branch (64:35): [True: 0, False: 0]
  Branch (64:48): [True: 0, False: 0]
  Branch (64:35): [True: 0, False: 0]
  Branch (64:48): [True: 0, False: 0]
  Branch (64:35): [True: 0, False: 0]
  Branch (64:48): [True: 0, False: 0]
  Branch (64:35): [True: 0, False: 0]
  Branch (64:48): [True: 0, False: 0]
  Branch (64:35): [True: 0, False: 0]
  Branch (64:48): [True: 0, False: 0]
65
0
        const bool multiple_exist{num_buffers > 1};
66
0
        const bool existing_buffer_non_full{non_empty && sim[idx].size() < MAX_BUFFER_SIZE};
  Branch (66:45): [True: 0, False: 0]
  Branch (66:58): [True: 0, False: 0]
  Branch (66:45): [True: 0, False: 0]
  Branch (66:58): [True: 0, False: 0]
  Branch (66:45): [True: 0, False: 0]
  Branch (66:58): [True: 0, False: 0]
  Branch (66:45): [True: 0, False: 0]
  Branch (66:58): [True: 0, False: 0]
  Branch (66:45): [True: 0, False: 0]
  Branch (66:58): [True: 0, False: 0]
  Branch (66:45): [True: 0, False: 0]
  Branch (66:58): [True: 0, False: 0]
  Branch (66:45): [True: 0, False: 0]
  Branch (66:58): [True: 0, False: 0]
67
0
        const bool existing_buffer_non_empty{non_empty && !sim[idx].empty()};
  Branch (67:46): [True: 0, False: 0]
  Branch (67:59): [True: 0, False: 0]
  Branch (67:46): [True: 0, False: 0]
  Branch (67:59): [True: 0, False: 0]
  Branch (67:46): [True: 0, False: 0]
  Branch (67:59): [True: 0, False: 0]
  Branch (67:46): [True: 0, False: 0]
  Branch (67:59): [True: 0, False: 0]
  Branch (67:46): [True: 0, False: 0]
  Branch (67:59): [True: 0, False: 0]
  Branch (67:46): [True: 0, False: 0]
  Branch (67:59): [True: 0, False: 0]
  Branch (67:46): [True: 0, False: 0]
  Branch (67:59): [True: 0, False: 0]
68
0
        assert(non_full || non_empty);
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
  Branch (68:9): [True: 0, False: 0]
69
0
        while (true) {
  Branch (69:16): [Folded - Ignored]
  Branch (69:16): [Folded - Ignored]
  Branch (69:16): [Folded - Ignored]
  Branch (69:16): [Folded - Ignored]
  Branch (69:16): [Folded - Ignored]
  Branch (69:16): [Folded - Ignored]
  Branch (69:16): [Folded - Ignored]
70
0
            if (non_full && command-- == 0) {
  Branch (70:17): [True: 0, False: 0]
  Branch (70:29): [True: 0, False: 0]
  Branch (70:17): [True: 0, False: 0]
  Branch (70:29): [True: 0, False: 0]
  Branch (70:17): [True: 0, False: 0]
  Branch (70:29): [True: 0, False: 0]
  Branch (70:17): [True: 0, False: 0]
  Branch (70:29): [True: 0, False: 0]
  Branch (70:17): [True: 0, False: 0]
  Branch (70:29): [True: 0, False: 0]
  Branch (70:17): [True: 0, False: 0]
  Branch (70:29): [True: 0, False: 0]
  Branch (70:17): [True: 0, False: 0]
  Branch (70:29): [True: 0, False: 0]
71
                /* Default construct. */
72
0
                real.emplace_back();
73
0
                sim.emplace_back();
74
0
                break;
75
0
            }
76
0
            if (non_empty && command-- == 0) {
  Branch (76:17): [True: 0, False: 0]
  Branch (76:30): [True: 0, False: 0]
  Branch (76:17): [True: 0, False: 0]
  Branch (76:30): [True: 0, False: 0]
  Branch (76:17): [True: 0, False: 0]
  Branch (76:30): [True: 0, False: 0]
  Branch (76:17): [True: 0, False: 0]
  Branch (76:30): [True: 0, False: 0]
  Branch (76:17): [True: 0, False: 0]
  Branch (76:30): [True: 0, False: 0]
  Branch (76:17): [True: 0, False: 0]
  Branch (76:30): [True: 0, False: 0]
  Branch (76:17): [True: 0, False: 0]
  Branch (76:30): [True: 0, False: 0]
77
                /* resize() */
78
0
                compare_fn(real[idx], sim[idx]);
79
0
                size_t new_size = provider.ConsumeIntegralInRange<size_t>(0, MAX_BUFFER_SIZE);
80
0
                real[idx].resize(new_size);
81
0
                sim[idx].resize(new_size);
82
0
                assert(real[idx].size() == new_size);
  Branch (82:17): [True: 0, False: 0]
  Branch (82:17): [True: 0, False: 0]
  Branch (82:17): [True: 0, False: 0]
  Branch (82:17): [True: 0, False: 0]
  Branch (82:17): [True: 0, False: 0]
  Branch (82:17): [True: 0, False: 0]
  Branch (82:17): [True: 0, False: 0]
83
0
                break;
84
0
            }
85
0
            if (non_empty && command-- == 0) {
  Branch (85:17): [True: 0, False: 0]
  Branch (85:30): [True: 0, False: 0]
  Branch (85:17): [True: 0, False: 0]
  Branch (85:30): [True: 0, False: 0]
  Branch (85:17): [True: 0, False: 0]
  Branch (85:30): [True: 0, False: 0]
  Branch (85:17): [True: 0, False: 0]
  Branch (85:30): [True: 0, False: 0]
  Branch (85:17): [True: 0, False: 0]
  Branch (85:30): [True: 0, False: 0]
  Branch (85:17): [True: 0, False: 0]
  Branch (85:30): [True: 0, False: 0]
  Branch (85:17): [True: 0, False: 0]
  Branch (85:30): [True: 0, False: 0]
86
                /* clear() */
87
0
                compare_fn(real[idx], sim[idx]);
88
0
                real[idx].clear();
89
0
                sim[idx].clear();
90
0
                assert(real[idx].empty());
  Branch (90:17): [True: 0, False: 0]
  Branch (90:17): [True: 0, False: 0]
  Branch (90:17): [True: 0, False: 0]
  Branch (90:17): [True: 0, False: 0]
  Branch (90:17): [True: 0, False: 0]
  Branch (90:17): [True: 0, False: 0]
  Branch (90:17): [True: 0, False: 0]
91
0
                break;
92
0
            }
93
0
            if (non_empty && command-- == 0) {
  Branch (93:17): [True: 0, False: 0]
  Branch (93:30): [True: 0, False: 0]
  Branch (93:17): [True: 0, False: 0]
  Branch (93:30): [True: 0, False: 0]
  Branch (93:17): [True: 0, False: 0]
  Branch (93:30): [True: 0, False: 0]
  Branch (93:17): [True: 0, False: 0]
  Branch (93:30): [True: 0, False: 0]
  Branch (93:17): [True: 0, False: 0]
  Branch (93:30): [True: 0, False: 0]
  Branch (93:17): [True: 0, False: 0]
  Branch (93:30): [True: 0, False: 0]
  Branch (93:17): [True: 0, False: 0]
  Branch (93:30): [True: 0, False: 0]
94
                /* Copy construct default. */
95
0
                compare_fn(real[idx], sim[idx]);
96
0
                real[idx] = VecDeque<T>();
97
0
                sim[idx].clear();
98
0
                assert(real[idx].size() == 0);
  Branch (98:17): [True: 0, False: 0]
  Branch (98:17): [True: 0, False: 0]
  Branch (98:17): [True: 0, False: 0]
  Branch (98:17): [True: 0, False: 0]
  Branch (98:17): [True: 0, False: 0]
  Branch (98:17): [True: 0, False: 0]
  Branch (98:17): [True: 0, False: 0]
99
0
                break;
100
0
            }
101
0
            if (non_empty && command-- == 0) {
  Branch (101:17): [True: 0, False: 0]
  Branch (101:30): [True: 0, False: 0]
  Branch (101:17): [True: 0, False: 0]
  Branch (101:30): [True: 0, False: 0]
  Branch (101:17): [True: 0, False: 0]
  Branch (101:30): [True: 0, False: 0]
  Branch (101:17): [True: 0, False: 0]
  Branch (101:30): [True: 0, False: 0]
  Branch (101:17): [True: 0, False: 0]
  Branch (101:30): [True: 0, False: 0]
  Branch (101:17): [True: 0, False: 0]
  Branch (101:30): [True: 0, False: 0]
  Branch (101:17): [True: 0, False: 0]
  Branch (101:30): [True: 0, False: 0]
102
                /* Destruct. */
103
0
                compare_fn(real.back(), sim.back());
104
0
                real.pop_back();
105
0
                sim.pop_back();
106
0
                break;
107
0
            }
108
0
            if (partially_full && command-- == 0) {
  Branch (108:17): [True: 0, False: 0]
  Branch (108:35): [True: 0, False: 0]
  Branch (108:17): [True: 0, False: 0]
  Branch (108:35): [True: 0, False: 0]
  Branch (108:17): [True: 0, False: 0]
  Branch (108:35): [True: 0, False: 0]
  Branch (108:17): [True: 0, False: 0]
  Branch (108:35): [True: 0, False: 0]
  Branch (108:17): [True: 0, False: 0]
  Branch (108:35): [True: 0, False: 0]
  Branch (108:17): [True: 0, False: 0]
  Branch (108:35): [True: 0, False: 0]
  Branch (108:17): [True: 0, False: 0]
  Branch (108:35): [True: 0, False: 0]
109
                /* Copy construct. */
110
0
                real.emplace_back(real[idx]);
111
0
                sim.emplace_back(sim[idx]);
112
0
                break;
113
0
            }
114
0
            if (partially_full && command-- == 0) {
  Branch (114:17): [True: 0, False: 0]
  Branch (114:35): [True: 0, False: 0]
  Branch (114:17): [True: 0, False: 0]
  Branch (114:35): [True: 0, False: 0]
  Branch (114:17): [True: 0, False: 0]
  Branch (114:35): [True: 0, False: 0]
  Branch (114:17): [True: 0, False: 0]
  Branch (114:35): [True: 0, False: 0]
  Branch (114:17): [True: 0, False: 0]
  Branch (114:35): [True: 0, False: 0]
  Branch (114:17): [True: 0, False: 0]
  Branch (114:35): [True: 0, False: 0]
  Branch (114:17): [True: 0, False: 0]
  Branch (114:35): [True: 0, False: 0]
115
                /* Move construct. */
116
0
                VecDeque<T> copy(real[idx]);
117
0
                real.emplace_back(std::move(copy));
118
0
                sim.emplace_back(sim[idx]);
119
0
                break;
120
0
            }
121
0
            if (multiple_exist && command-- == 0) {
  Branch (121:17): [True: 0, False: 0]
  Branch (121:35): [True: 0, False: 0]
  Branch (121:17): [True: 0, False: 0]
  Branch (121:35): [True: 0, False: 0]
  Branch (121:17): [True: 0, False: 0]
  Branch (121:35): [True: 0, False: 0]
  Branch (121:17): [True: 0, False: 0]
  Branch (121:35): [True: 0, False: 0]
  Branch (121:17): [True: 0, False: 0]
  Branch (121:35): [True: 0, False: 0]
  Branch (121:17): [True: 0, False: 0]
  Branch (121:35): [True: 0, False: 0]
  Branch (121:17): [True: 0, False: 0]
  Branch (121:35): [True: 0, False: 0]
122
                /* swap() */
123
0
                swap(real[idx], real[(idx + 1) % num_buffers]);
124
0
                swap(sim[idx], sim[(idx + 1) % num_buffers]);
125
0
                break;
126
0
            }
127
0
            if (multiple_exist && command-- == 0) {
  Branch (127:17): [True: 0, False: 0]
  Branch (127:35): [True: 0, False: 0]
  Branch (127:17): [True: 0, False: 0]
  Branch (127:35): [True: 0, False: 0]
  Branch (127:17): [True: 0, False: 0]
  Branch (127:35): [True: 0, False: 0]
  Branch (127:17): [True: 0, False: 0]
  Branch (127:35): [True: 0, False: 0]
  Branch (127:17): [True: 0, False: 0]
  Branch (127:35): [True: 0, False: 0]
  Branch (127:17): [True: 0, False: 0]
  Branch (127:35): [True: 0, False: 0]
  Branch (127:17): [True: 0, False: 0]
  Branch (127:35): [True: 0, False: 0]
128
                /* Copy assign. */
129
0
                compare_fn(real[idx], sim[idx]);
130
0
                real[idx] = real[(idx + 1) % num_buffers];
131
0
                sim[idx] = sim[(idx + 1) % num_buffers];
132
0
                break;
133
0
            }
134
0
            if (multiple_exist && command-- == 0) {
  Branch (134:17): [True: 0, False: 0]
  Branch (134:35): [True: 0, False: 0]
  Branch (134:17): [True: 0, False: 0]
  Branch (134:35): [True: 0, False: 0]
  Branch (134:17): [True: 0, False: 0]
  Branch (134:35): [True: 0, False: 0]
  Branch (134:17): [True: 0, False: 0]
  Branch (134:35): [True: 0, False: 0]
  Branch (134:17): [True: 0, False: 0]
  Branch (134:35): [True: 0, False: 0]
  Branch (134:17): [True: 0, False: 0]
  Branch (134:35): [True: 0, False: 0]
  Branch (134:17): [True: 0, False: 0]
  Branch (134:35): [True: 0, False: 0]
135
                /* Move assign. */
136
0
                VecDeque<T> copy(real[(idx + 1) % num_buffers]);
137
0
                compare_fn(real[idx], sim[idx]);
138
0
                real[idx] = std::move(copy);
139
0
                sim[idx] = sim[(idx + 1) % num_buffers];
140
0
                break;
141
0
            }
142
0
            if (non_empty && command-- == 0) {
  Branch (142:17): [True: 0, False: 0]
  Branch (142:30): [True: 0, False: 0]
  Branch (142:17): [True: 0, False: 0]
  Branch (142:30): [True: 0, False: 0]
  Branch (142:17): [True: 0, False: 0]
  Branch (142:30): [True: 0, False: 0]
  Branch (142:17): [True: 0, False: 0]
  Branch (142:30): [True: 0, False: 0]
  Branch (142:17): [True: 0, False: 0]
  Branch (142:30): [True: 0, False: 0]
  Branch (142:17): [True: 0, False: 0]
  Branch (142:30): [True: 0, False: 0]
  Branch (142:17): [True: 0, False: 0]
  Branch (142:30): [True: 0, False: 0]
143
                /* Self swap() */
144
0
                swap(real[idx], real[idx]);
145
0
                break;
146
0
            }
147
0
            if (non_empty && command-- == 0) {
  Branch (147:17): [True: 0, False: 0]
  Branch (147:30): [True: 0, False: 0]
  Branch (147:17): [True: 0, False: 0]
  Branch (147:30): [True: 0, False: 0]
  Branch (147:17): [True: 0, False: 0]
  Branch (147:30): [True: 0, False: 0]
  Branch (147:17): [True: 0, False: 0]
  Branch (147:30): [True: 0, False: 0]
  Branch (147:17): [True: 0, False: 0]
  Branch (147:30): [True: 0, False: 0]
  Branch (147:17): [True: 0, False: 0]
  Branch (147:30): [True: 0, False: 0]
  Branch (147:17): [True: 0, False: 0]
  Branch (147:30): [True: 0, False: 0]
148
                /* Self-copy assign. */
149
0
                real[idx] = real[idx];
150
0
                break;
151
0
            }
152
0
            if (non_empty && command-- == 0) {
  Branch (152:17): [True: 0, False: 0]
  Branch (152:30): [True: 0, False: 0]
  Branch (152:17): [True: 0, False: 0]
  Branch (152:30): [True: 0, False: 0]
  Branch (152:17): [True: 0, False: 0]
  Branch (152:30): [True: 0, False: 0]
  Branch (152:17): [True: 0, False: 0]
  Branch (152:30): [True: 0, False: 0]
  Branch (152:17): [True: 0, False: 0]
  Branch (152:30): [True: 0, False: 0]
  Branch (152:17): [True: 0, False: 0]
  Branch (152:30): [True: 0, False: 0]
  Branch (152:17): [True: 0, False: 0]
  Branch (152:30): [True: 0, False: 0]
153
                /* Self-move assign. */
154
                // Do not use std::move(real[idx]) here: -Wself-move correctly warns about that.
155
0
                real[idx] = static_cast<VecDeque<T>&&>(real[idx]);
156
0
                break;
157
0
            }
158
0
            if (non_empty && command-- == 0) {
  Branch (158:17): [True: 0, False: 0]
  Branch (158:30): [True: 0, False: 0]
  Branch (158:17): [True: 0, False: 0]
  Branch (158:30): [True: 0, False: 0]
  Branch (158:17): [True: 0, False: 0]
  Branch (158:30): [True: 0, False: 0]
  Branch (158:17): [True: 0, False: 0]
  Branch (158:30): [True: 0, False: 0]
  Branch (158:17): [True: 0, False: 0]
  Branch (158:30): [True: 0, False: 0]
  Branch (158:17): [True: 0, False: 0]
  Branch (158:30): [True: 0, False: 0]
  Branch (158:17): [True: 0, False: 0]
  Branch (158:30): [True: 0, False: 0]
159
                /* reserve() */
160
0
                size_t res_size = provider.ConsumeIntegralInRange<size_t>(0, MAX_BUFFER_SIZE);
161
0
                size_t old_cap = real[idx].capacity();
162
0
                size_t old_size = real[idx].size();
163
0
                real[idx].reserve(res_size);
164
0
                assert(real[idx].size() == old_size);
  Branch (164:17): [True: 0, False: 0]
  Branch (164:17): [True: 0, False: 0]
  Branch (164:17): [True: 0, False: 0]
  Branch (164:17): [True: 0, False: 0]
  Branch (164:17): [True: 0, False: 0]
  Branch (164:17): [True: 0, False: 0]
  Branch (164:17): [True: 0, False: 0]
165
0
                assert(real[idx].capacity() == std::max(old_cap, res_size));
  Branch (165:17): [True: 0, False: 0]
  Branch (165:17): [True: 0, False: 0]
  Branch (165:17): [True: 0, False: 0]
  Branch (165:17): [True: 0, False: 0]
  Branch (165:17): [True: 0, False: 0]
  Branch (165:17): [True: 0, False: 0]
  Branch (165:17): [True: 0, False: 0]
166
0
                break;
167
0
            }
168
0
            if (non_empty && command-- == 0) {
  Branch (168:17): [True: 0, False: 0]
  Branch (168:30): [True: 0, False: 0]
  Branch (168:17): [True: 0, False: 0]
  Branch (168:30): [True: 0, False: 0]
  Branch (168:17): [True: 0, False: 0]
  Branch (168:30): [True: 0, False: 0]
  Branch (168:17): [True: 0, False: 0]
  Branch (168:30): [True: 0, False: 0]
  Branch (168:17): [True: 0, False: 0]
  Branch (168:30): [True: 0, False: 0]
  Branch (168:17): [True: 0, False: 0]
  Branch (168:30): [True: 0, False: 0]
  Branch (168:17): [True: 0, False: 0]
  Branch (168:30): [True: 0, False: 0]
169
                /* shrink_to_fit() */
170
0
                size_t old_size = real[idx].size();
171
0
                real[idx].shrink_to_fit();
172
0
                assert(real[idx].size() == old_size);
  Branch (172:17): [True: 0, False: 0]
  Branch (172:17): [True: 0, False: 0]
  Branch (172:17): [True: 0, False: 0]
  Branch (172:17): [True: 0, False: 0]
  Branch (172:17): [True: 0, False: 0]
  Branch (172:17): [True: 0, False: 0]
  Branch (172:17): [True: 0, False: 0]
173
0
                assert(real[idx].capacity() == old_size);
  Branch (173:17): [True: 0, False: 0]
  Branch (173:17): [True: 0, False: 0]
  Branch (173:17): [True: 0, False: 0]
  Branch (173:17): [True: 0, False: 0]
  Branch (173:17): [True: 0, False: 0]
  Branch (173:17): [True: 0, False: 0]
  Branch (173:17): [True: 0, False: 0]
174
0
                break;
175
0
            }
176
0
            if (existing_buffer_non_full && command-- == 0) {
  Branch (176:17): [True: 0, False: 0]
  Branch (176:45): [True: 0, False: 0]
  Branch (176:17): [True: 0, False: 0]
  Branch (176:45): [True: 0, False: 0]
  Branch (176:17): [True: 0, False: 0]
  Branch (176:45): [True: 0, False: 0]
  Branch (176:17): [True: 0, False: 0]
  Branch (176:45): [True: 0, False: 0]
  Branch (176:17): [True: 0, False: 0]
  Branch (176:45): [True: 0, False: 0]
  Branch (176:17): [True: 0, False: 0]
  Branch (176:45): [True: 0, False: 0]
  Branch (176:17): [True: 0, False: 0]
  Branch (176:45): [True: 0, False: 0]
177
                /* push_back() (copying) */
178
0
                tmp = T(rng.rand64());
179
0
                size_t old_size = real[idx].size();
180
0
                size_t old_cap = real[idx].capacity();
181
0
                real[idx].push_back(*tmp);
182
0
                sim[idx].push_back(*tmp);
183
0
                assert(real[idx].size() == old_size + 1);
  Branch (183:17): [True: 0, False: 0]
  Branch (183:17): [True: 0, False: 0]
  Branch (183:17): [True: 0, False: 0]
  Branch (183:17): [True: 0, False: 0]
  Branch (183:17): [True: 0, False: 0]
  Branch (183:17): [True: 0, False: 0]
  Branch (183:17): [True: 0, False: 0]
184
0
                if (old_cap > old_size) {
  Branch (184:21): [True: 0, False: 0]
  Branch (184:21): [True: 0, False: 0]
  Branch (184:21): [True: 0, False: 0]
  Branch (184:21): [True: 0, False: 0]
  Branch (184:21): [True: 0, False: 0]
  Branch (184:21): [True: 0, False: 0]
  Branch (184:21): [True: 0, False: 0]
185
0
                    assert(real[idx].capacity() == old_cap);
  Branch (185:21): [True: 0, False: 0]
  Branch (185:21): [True: 0, False: 0]
  Branch (185:21): [True: 0, False: 0]
  Branch (185:21): [True: 0, False: 0]
  Branch (185:21): [True: 0, False: 0]
  Branch (185:21): [True: 0, False: 0]
  Branch (185:21): [True: 0, False: 0]
186
0
                } else {
187
0
                    assert(real[idx].capacity() > old_cap);
  Branch (187:21): [True: 0, False: 0]
  Branch (187:21): [True: 0, False: 0]
  Branch (187:21): [True: 0, False: 0]
  Branch (187:21): [True: 0, False: 0]
  Branch (187:21): [True: 0, False: 0]
  Branch (187:21): [True: 0, False: 0]
  Branch (187:21): [True: 0, False: 0]
188
0
                    assert(real[idx].capacity() <= 2 * (old_cap + 1));
  Branch (188:21): [True: 0, False: 0]
  Branch (188:21): [True: 0, False: 0]
  Branch (188:21): [True: 0, False: 0]
  Branch (188:21): [True: 0, False: 0]
  Branch (188:21): [True: 0, False: 0]
  Branch (188:21): [True: 0, False: 0]
  Branch (188:21): [True: 0, False: 0]
189
0
                }
190
0
                break;
191
0
            }
192
0
            if (existing_buffer_non_full && command-- == 0) {
  Branch (192:17): [True: 0, False: 0]
  Branch (192:45): [True: 0, False: 0]
  Branch (192:17): [True: 0, False: 0]
  Branch (192:45): [True: 0, False: 0]
  Branch (192:17): [True: 0, False: 0]
  Branch (192:45): [True: 0, False: 0]
  Branch (192:17): [True: 0, False: 0]
  Branch (192:45): [True: 0, False: 0]
  Branch (192:17): [True: 0, False: 0]
  Branch (192:45): [True: 0, False: 0]
  Branch (192:17): [True: 0, False: 0]
  Branch (192:45): [True: 0, False: 0]
  Branch (192:17): [True: 0, False: 0]
  Branch (192:45): [True: 0, False: 0]
193
                /* push_back() (moving) */
194
0
                tmp = T(rng.rand64());
195
0
                size_t old_size = real[idx].size();
196
0
                size_t old_cap = real[idx].capacity();
197
0
                sim[idx].push_back(*tmp);
198
0
                real[idx].push_back(std::move(*tmp));
199
0
                assert(real[idx].size() == old_size + 1);
  Branch (199:17): [True: 0, False: 0]
  Branch (199:17): [True: 0, False: 0]
  Branch (199:17): [True: 0, False: 0]
  Branch (199:17): [True: 0, False: 0]
  Branch (199:17): [True: 0, False: 0]
  Branch (199:17): [True: 0, False: 0]
  Branch (199:17): [True: 0, False: 0]
200
0
                if (old_cap > old_size) {
  Branch (200:21): [True: 0, False: 0]
  Branch (200:21): [True: 0, False: 0]
  Branch (200:21): [True: 0, False: 0]
  Branch (200:21): [True: 0, False: 0]
  Branch (200:21): [True: 0, False: 0]
  Branch (200:21): [True: 0, False: 0]
  Branch (200:21): [True: 0, False: 0]
201
0
                    assert(real[idx].capacity() == old_cap);
  Branch (201:21): [True: 0, False: 0]
  Branch (201:21): [True: 0, False: 0]
  Branch (201:21): [True: 0, False: 0]
  Branch (201:21): [True: 0, False: 0]
  Branch (201:21): [True: 0, False: 0]
  Branch (201:21): [True: 0, False: 0]
  Branch (201:21): [True: 0, False: 0]
202
0
                } else {
203
0
                    assert(real[idx].capacity() > old_cap);
  Branch (203:21): [True: 0, False: 0]
  Branch (203:21): [True: 0, False: 0]
  Branch (203:21): [True: 0, False: 0]
  Branch (203:21): [True: 0, False: 0]
  Branch (203:21): [True: 0, False: 0]
  Branch (203:21): [True: 0, False: 0]
  Branch (203:21): [True: 0, False: 0]
204
0
                    assert(real[idx].capacity() <= 2 * (old_cap + 1));
  Branch (204:21): [True: 0, False: 0]
  Branch (204:21): [True: 0, False: 0]
  Branch (204:21): [True: 0, False: 0]
  Branch (204:21): [True: 0, False: 0]
  Branch (204:21): [True: 0, False: 0]
  Branch (204:21): [True: 0, False: 0]
  Branch (204:21): [True: 0, False: 0]
205
0
                }
206
0
                break;
207
0
            }
208
0
            if (existing_buffer_non_full && command-- == 0) {
  Branch (208:17): [True: 0, False: 0]
  Branch (208:45): [True: 0, False: 0]
  Branch (208:17): [True: 0, False: 0]
  Branch (208:45): [True: 0, False: 0]
  Branch (208:17): [True: 0, False: 0]
  Branch (208:45): [True: 0, False: 0]
  Branch (208:17): [True: 0, False: 0]
  Branch (208:45): [True: 0, False: 0]
  Branch (208:17): [True: 0, False: 0]
  Branch (208:45): [True: 0, False: 0]
  Branch (208:17): [True: 0, False: 0]
  Branch (208:45): [True: 0, False: 0]
  Branch (208:17): [True: 0, False: 0]
  Branch (208:45): [True: 0, False: 0]
209
                /* emplace_back() */
210
0
                uint64_t seed{rng.rand64()};
211
0
                size_t old_size = real[idx].size();
212
0
                size_t old_cap = real[idx].capacity();
213
0
                sim[idx].emplace_back(seed);
214
0
                real[idx].emplace_back(seed);
215
0
                assert(real[idx].size() == old_size + 1);
  Branch (215:17): [True: 0, False: 0]
  Branch (215:17): [True: 0, False: 0]
  Branch (215:17): [True: 0, False: 0]
  Branch (215:17): [True: 0, False: 0]
  Branch (215:17): [True: 0, False: 0]
  Branch (215:17): [True: 0, False: 0]
  Branch (215:17): [True: 0, False: 0]
216
0
                if (old_cap > old_size) {
  Branch (216:21): [True: 0, False: 0]
  Branch (216:21): [True: 0, False: 0]
  Branch (216:21): [True: 0, False: 0]
  Branch (216:21): [True: 0, False: 0]
  Branch (216:21): [True: 0, False: 0]
  Branch (216:21): [True: 0, False: 0]
  Branch (216:21): [True: 0, False: 0]
217
0
                    assert(real[idx].capacity() == old_cap);
  Branch (217:21): [True: 0, False: 0]
  Branch (217:21): [True: 0, False: 0]
  Branch (217:21): [True: 0, False: 0]
  Branch (217:21): [True: 0, False: 0]
  Branch (217:21): [True: 0, False: 0]
  Branch (217:21): [True: 0, False: 0]
  Branch (217:21): [True: 0, False: 0]
218
0
                } else {
219
0
                    assert(real[idx].capacity() > old_cap);
  Branch (219:21): [True: 0, False: 0]
  Branch (219:21): [True: 0, False: 0]
  Branch (219:21): [True: 0, False: 0]
  Branch (219:21): [True: 0, False: 0]
  Branch (219:21): [True: 0, False: 0]
  Branch (219:21): [True: 0, False: 0]
  Branch (219:21): [True: 0, False: 0]
220
0
                    assert(real[idx].capacity() <= 2 * (old_cap + 1));
  Branch (220:21): [True: 0, False: 0]
  Branch (220:21): [True: 0, False: 0]
  Branch (220:21): [True: 0, False: 0]
  Branch (220:21): [True: 0, False: 0]
  Branch (220:21): [True: 0, False: 0]
  Branch (220:21): [True: 0, False: 0]
  Branch (220:21): [True: 0, False: 0]
221
0
                }
222
0
                break;
223
0
            }
224
0
            if (existing_buffer_non_full && command-- == 0) {
  Branch (224:17): [True: 0, False: 0]
  Branch (224:45): [True: 0, False: 0]
  Branch (224:17): [True: 0, False: 0]
  Branch (224:45): [True: 0, False: 0]
  Branch (224:17): [True: 0, False: 0]
  Branch (224:45): [True: 0, False: 0]
  Branch (224:17): [True: 0, False: 0]
  Branch (224:45): [True: 0, False: 0]
  Branch (224:17): [True: 0, False: 0]
  Branch (224:45): [True: 0, False: 0]
  Branch (224:17): [True: 0, False: 0]
  Branch (224:45): [True: 0, False: 0]
  Branch (224:17): [True: 0, False: 0]
  Branch (224:45): [True: 0, False: 0]
225
                /* push_front() (copying) */
226
0
                tmp = T(rng.rand64());
227
0
                size_t old_size = real[idx].size();
228
0
                size_t old_cap = real[idx].capacity();
229
0
                real[idx].push_front(*tmp);
230
0
                sim[idx].push_front(*tmp);
231
0
                assert(real[idx].size() == old_size + 1);
  Branch (231:17): [True: 0, False: 0]
  Branch (231:17): [True: 0, False: 0]
  Branch (231:17): [True: 0, False: 0]
  Branch (231:17): [True: 0, False: 0]
  Branch (231:17): [True: 0, False: 0]
  Branch (231:17): [True: 0, False: 0]
  Branch (231:17): [True: 0, False: 0]
232
0
                if (old_cap > old_size) {
  Branch (232:21): [True: 0, False: 0]
  Branch (232:21): [True: 0, False: 0]
  Branch (232:21): [True: 0, False: 0]
  Branch (232:21): [True: 0, False: 0]
  Branch (232:21): [True: 0, False: 0]
  Branch (232:21): [True: 0, False: 0]
  Branch (232:21): [True: 0, False: 0]
233
0
                    assert(real[idx].capacity() == old_cap);
  Branch (233:21): [True: 0, False: 0]
  Branch (233:21): [True: 0, False: 0]
  Branch (233:21): [True: 0, False: 0]
  Branch (233:21): [True: 0, False: 0]
  Branch (233:21): [True: 0, False: 0]
  Branch (233:21): [True: 0, False: 0]
  Branch (233:21): [True: 0, False: 0]
234
0
                } else {
235
0
                    assert(real[idx].capacity() > old_cap);
  Branch (235:21): [True: 0, False: 0]
  Branch (235:21): [True: 0, False: 0]
  Branch (235:21): [True: 0, False: 0]
  Branch (235:21): [True: 0, False: 0]
  Branch (235:21): [True: 0, False: 0]
  Branch (235:21): [True: 0, False: 0]
  Branch (235:21): [True: 0, False: 0]
236
0
                    assert(real[idx].capacity() <= 2 * (old_cap + 1));
  Branch (236:21): [True: 0, False: 0]
  Branch (236:21): [True: 0, False: 0]
  Branch (236:21): [True: 0, False: 0]
  Branch (236:21): [True: 0, False: 0]
  Branch (236:21): [True: 0, False: 0]
  Branch (236:21): [True: 0, False: 0]
  Branch (236:21): [True: 0, False: 0]
237
0
                }
238
0
                break;
239
0
            }
240
0
            if (existing_buffer_non_full && command-- == 0) {
  Branch (240:17): [True: 0, False: 0]
  Branch (240:45): [True: 0, False: 0]
  Branch (240:17): [True: 0, False: 0]
  Branch (240:45): [True: 0, False: 0]
  Branch (240:17): [True: 0, False: 0]
  Branch (240:45): [True: 0, False: 0]
  Branch (240:17): [True: 0, False: 0]
  Branch (240:45): [True: 0, False: 0]
  Branch (240:17): [True: 0, False: 0]
  Branch (240:45): [True: 0, False: 0]
  Branch (240:17): [True: 0, False: 0]
  Branch (240:45): [True: 0, False: 0]
  Branch (240:17): [True: 0, False: 0]
  Branch (240:45): [True: 0, False: 0]
241
                /* push_front() (moving) */
242
0
                tmp = T(rng.rand64());
243
0
                size_t old_size = real[idx].size();
244
0
                size_t old_cap = real[idx].capacity();
245
0
                sim[idx].push_front(*tmp);
246
0
                real[idx].push_front(std::move(*tmp));
247
0
                assert(real[idx].size() == old_size + 1);
  Branch (247:17): [True: 0, False: 0]
  Branch (247:17): [True: 0, False: 0]
  Branch (247:17): [True: 0, False: 0]
  Branch (247:17): [True: 0, False: 0]
  Branch (247:17): [True: 0, False: 0]
  Branch (247:17): [True: 0, False: 0]
  Branch (247:17): [True: 0, False: 0]
248
0
                if (old_cap > old_size) {
  Branch (248:21): [True: 0, False: 0]
  Branch (248:21): [True: 0, False: 0]
  Branch (248:21): [True: 0, False: 0]
  Branch (248:21): [True: 0, False: 0]
  Branch (248:21): [True: 0, False: 0]
  Branch (248:21): [True: 0, False: 0]
  Branch (248:21): [True: 0, False: 0]
249
0
                    assert(real[idx].capacity() == old_cap);
  Branch (249:21): [True: 0, False: 0]
  Branch (249:21): [True: 0, False: 0]
  Branch (249:21): [True: 0, False: 0]
  Branch (249:21): [True: 0, False: 0]
  Branch (249:21): [True: 0, False: 0]
  Branch (249:21): [True: 0, False: 0]
  Branch (249:21): [True: 0, False: 0]
250
0
                } else {
251
0
                    assert(real[idx].capacity() > old_cap);
  Branch (251:21): [True: 0, False: 0]
  Branch (251:21): [True: 0, False: 0]
  Branch (251:21): [True: 0, False: 0]
  Branch (251:21): [True: 0, False: 0]
  Branch (251:21): [True: 0, False: 0]
  Branch (251:21): [True: 0, False: 0]
  Branch (251:21): [True: 0, False: 0]
252
0
                    assert(real[idx].capacity() <= 2 * (old_cap + 1));
  Branch (252:21): [True: 0, False: 0]
  Branch (252:21): [True: 0, False: 0]
  Branch (252:21): [True: 0, False: 0]
  Branch (252:21): [True: 0, False: 0]
  Branch (252:21): [True: 0, False: 0]
  Branch (252:21): [True: 0, False: 0]
  Branch (252:21): [True: 0, False: 0]
253
0
                }
254
0
                break;
255
0
            }
256
0
            if (existing_buffer_non_full && command-- == 0) {
  Branch (256:17): [True: 0, False: 0]
  Branch (256:45): [True: 0, False: 0]
  Branch (256:17): [True: 0, False: 0]
  Branch (256:45): [True: 0, False: 0]
  Branch (256:17): [True: 0, False: 0]
  Branch (256:45): [True: 0, False: 0]
  Branch (256:17): [True: 0, False: 0]
  Branch (256:45): [True: 0, False: 0]
  Branch (256:17): [True: 0, False: 0]
  Branch (256:45): [True: 0, False: 0]
  Branch (256:17): [True: 0, False: 0]
  Branch (256:45): [True: 0, False: 0]
  Branch (256:17): [True: 0, False: 0]
  Branch (256:45): [True: 0, False: 0]
257
                /* emplace_front() */
258
0
                uint64_t seed{rng.rand64()};
259
0
                size_t old_size = real[idx].size();
260
0
                size_t old_cap = real[idx].capacity();
261
0
                sim[idx].emplace_front(seed);
262
0
                real[idx].emplace_front(seed);
263
0
                assert(real[idx].size() == old_size + 1);
  Branch (263:17): [True: 0, False: 0]
  Branch (263:17): [True: 0, False: 0]
  Branch (263:17): [True: 0, False: 0]
  Branch (263:17): [True: 0, False: 0]
  Branch (263:17): [True: 0, False: 0]
  Branch (263:17): [True: 0, False: 0]
  Branch (263:17): [True: 0, False: 0]
264
0
                if (old_cap > old_size) {
  Branch (264:21): [True: 0, False: 0]
  Branch (264:21): [True: 0, False: 0]
  Branch (264:21): [True: 0, False: 0]
  Branch (264:21): [True: 0, False: 0]
  Branch (264:21): [True: 0, False: 0]
  Branch (264:21): [True: 0, False: 0]
  Branch (264:21): [True: 0, False: 0]
265
0
                    assert(real[idx].capacity() == old_cap);
  Branch (265:21): [True: 0, False: 0]
  Branch (265:21): [True: 0, False: 0]
  Branch (265:21): [True: 0, False: 0]
  Branch (265:21): [True: 0, False: 0]
  Branch (265:21): [True: 0, False: 0]
  Branch (265:21): [True: 0, False: 0]
  Branch (265:21): [True: 0, False: 0]
266
0
                } else {
267
0
                    assert(real[idx].capacity() > old_cap);
  Branch (267:21): [True: 0, False: 0]
  Branch (267:21): [True: 0, False: 0]
  Branch (267:21): [True: 0, False: 0]
  Branch (267:21): [True: 0, False: 0]
  Branch (267:21): [True: 0, False: 0]
  Branch (267:21): [True: 0, False: 0]
  Branch (267:21): [True: 0, False: 0]
268
0
                    assert(real[idx].capacity() <= 2 * (old_cap + 1));
  Branch (268:21): [True: 0, False: 0]
  Branch (268:21): [True: 0, False: 0]
  Branch (268:21): [True: 0, False: 0]
  Branch (268:21): [True: 0, False: 0]
  Branch (268:21): [True: 0, False: 0]
  Branch (268:21): [True: 0, False: 0]
  Branch (268:21): [True: 0, False: 0]
269
0
                }
270
0
                break;
271
0
            }
272
0
            if (existing_buffer_non_empty && command-- == 0) {
  Branch (272:17): [True: 0, False: 0]
  Branch (272:46): [True: 0, False: 0]
  Branch (272:17): [True: 0, False: 0]
  Branch (272:46): [True: 0, False: 0]
  Branch (272:17): [True: 0, False: 0]
  Branch (272:46): [True: 0, False: 0]
  Branch (272:17): [True: 0, False: 0]
  Branch (272:46): [True: 0, False: 0]
  Branch (272:17): [True: 0, False: 0]
  Branch (272:46): [True: 0, False: 0]
  Branch (272:17): [True: 0, False: 0]
  Branch (272:46): [True: 0, False: 0]
  Branch (272:17): [True: 0, False: 0]
  Branch (272:46): [True: 0, False: 0]
273
                /* front() [modifying] */
274
0
                tmp = T(rng.rand64());
275
0
                size_t old_size = real[idx].size();
276
0
                assert(sim[idx].front() == real[idx].front());
  Branch (276:17): [True: 0, False: 0]
  Branch (276:17): [True: 0, False: 0]
  Branch (276:17): [True: 0, False: 0]
  Branch (276:17): [True: 0, False: 0]
  Branch (276:17): [True: 0, False: 0]
  Branch (276:17): [True: 0, False: 0]
  Branch (276:17): [True: 0, False: 0]
277
0
                sim[idx].front() = *tmp;
278
0
                real[idx].front() = std::move(*tmp);
279
0
                assert(real[idx].size() == old_size);
  Branch (279:17): [True: 0, False: 0]
  Branch (279:17): [True: 0, False: 0]
  Branch (279:17): [True: 0, False: 0]
  Branch (279:17): [True: 0, False: 0]
  Branch (279:17): [True: 0, False: 0]
  Branch (279:17): [True: 0, False: 0]
  Branch (279:17): [True: 0, False: 0]
280
0
                break;
281
0
            }
282
0
            if (existing_buffer_non_empty && command-- == 0) {
  Branch (282:17): [True: 0, False: 0]
  Branch (282:46): [True: 0, False: 0]
  Branch (282:17): [True: 0, False: 0]
  Branch (282:46): [True: 0, False: 0]
  Branch (282:17): [True: 0, False: 0]
  Branch (282:46): [True: 0, False: 0]
  Branch (282:17): [True: 0, False: 0]
  Branch (282:46): [True: 0, False: 0]
  Branch (282:17): [True: 0, False: 0]
  Branch (282:46): [True: 0, False: 0]
  Branch (282:17): [True: 0, False: 0]
  Branch (282:46): [True: 0, False: 0]
  Branch (282:17): [True: 0, False: 0]
  Branch (282:46): [True: 0, False: 0]
283
                /* back() [modifying] */
284
0
                tmp = T(rng.rand64());
285
0
                size_t old_size = real[idx].size();
286
0
                assert(sim[idx].back() == real[idx].back());
  Branch (286:17): [True: 0, False: 0]
  Branch (286:17): [True: 0, False: 0]
  Branch (286:17): [True: 0, False: 0]
  Branch (286:17): [True: 0, False: 0]
  Branch (286:17): [True: 0, False: 0]
  Branch (286:17): [True: 0, False: 0]
  Branch (286:17): [True: 0, False: 0]
287
0
                sim[idx].back() = *tmp;
288
0
                real[idx].back() = *tmp;
289
0
                assert(real[idx].size() == old_size);
  Branch (289:17): [True: 0, False: 0]
  Branch (289:17): [True: 0, False: 0]
  Branch (289:17): [True: 0, False: 0]
  Branch (289:17): [True: 0, False: 0]
  Branch (289:17): [True: 0, False: 0]
  Branch (289:17): [True: 0, False: 0]
  Branch (289:17): [True: 0, False: 0]
290
0
                break;
291
0
            }
292
0
            if (existing_buffer_non_empty && command-- == 0) {
  Branch (292:17): [True: 0, False: 0]
  Branch (292:46): [True: 0, False: 0]
  Branch (292:17): [True: 0, False: 0]
  Branch (292:46): [True: 0, False: 0]
  Branch (292:17): [True: 0, False: 0]
  Branch (292:46): [True: 0, False: 0]
  Branch (292:17): [True: 0, False: 0]
  Branch (292:46): [True: 0, False: 0]
  Branch (292:17): [True: 0, False: 0]
  Branch (292:46): [True: 0, False: 0]
  Branch (292:17): [True: 0, False: 0]
  Branch (292:46): [True: 0, False: 0]
  Branch (292:17): [True: 0, False: 0]
  Branch (292:46): [True: 0, False: 0]
293
                /* operator[] [modifying] */
294
0
                tmp = T(rng.rand64());
295
0
                size_t pos = provider.ConsumeIntegralInRange<size_t>(0, sim[idx].size() - 1);
296
0
                size_t old_size = real[idx].size();
297
0
                assert(sim[idx][pos] == real[idx][pos]);
  Branch (297:17): [True: 0, False: 0]
  Branch (297:17): [True: 0, False: 0]
  Branch (297:17): [True: 0, False: 0]
  Branch (297:17): [True: 0, False: 0]
  Branch (297:17): [True: 0, False: 0]
  Branch (297:17): [True: 0, False: 0]
  Branch (297:17): [True: 0, False: 0]
298
0
                sim[idx][pos] = *tmp;
299
0
                real[idx][pos] = std::move(*tmp);
300
0
                assert(real[idx].size() == old_size);
  Branch (300:17): [True: 0, False: 0]
  Branch (300:17): [True: 0, False: 0]
  Branch (300:17): [True: 0, False: 0]
  Branch (300:17): [True: 0, False: 0]
  Branch (300:17): [True: 0, False: 0]
  Branch (300:17): [True: 0, False: 0]
  Branch (300:17): [True: 0, False: 0]
301
0
                break;
302
0
            }
303
0
            if (existing_buffer_non_empty && command-- == 0) {
  Branch (303:17): [True: 0, False: 0]
  Branch (303:46): [True: 0, False: 0]
  Branch (303:17): [True: 0, False: 0]
  Branch (303:46): [True: 0, False: 0]
  Branch (303:17): [True: 0, False: 0]
  Branch (303:46): [True: 0, False: 0]
  Branch (303:17): [True: 0, False: 0]
  Branch (303:46): [True: 0, False: 0]
  Branch (303:17): [True: 0, False: 0]
  Branch (303:46): [True: 0, False: 0]
  Branch (303:17): [True: 0, False: 0]
  Branch (303:46): [True: 0, False: 0]
  Branch (303:17): [True: 0, False: 0]
  Branch (303:46): [True: 0, False: 0]
304
                /* pop_front() */
305
0
                assert(sim[idx].front() == real[idx].front());
  Branch (305:17): [True: 0, False: 0]
  Branch (305:17): [True: 0, False: 0]
  Branch (305:17): [True: 0, False: 0]
  Branch (305:17): [True: 0, False: 0]
  Branch (305:17): [True: 0, False: 0]
  Branch (305:17): [True: 0, False: 0]
  Branch (305:17): [True: 0, False: 0]
306
0
                size_t old_size = real[idx].size();
307
0
                sim[idx].pop_front();
308
0
                real[idx].pop_front();
309
0
                assert(real[idx].size() == old_size - 1);
  Branch (309:17): [True: 0, False: 0]
  Branch (309:17): [True: 0, False: 0]
  Branch (309:17): [True: 0, False: 0]
  Branch (309:17): [True: 0, False: 0]
  Branch (309:17): [True: 0, False: 0]
  Branch (309:17): [True: 0, False: 0]
  Branch (309:17): [True: 0, False: 0]
310
0
                break;
311
0
            }
312
0
            if (existing_buffer_non_empty && command-- == 0) {
  Branch (312:17): [True: 0, False: 0]
  Branch (312:46): [True: 0, False: 0]
  Branch (312:17): [True: 0, False: 0]
  Branch (312:46): [True: 0, False: 0]
  Branch (312:17): [True: 0, False: 0]
  Branch (312:46): [True: 0, False: 0]
  Branch (312:17): [True: 0, False: 0]
  Branch (312:46): [True: 0, False: 0]
  Branch (312:17): [True: 0, False: 0]
  Branch (312:46): [True: 0, False: 0]
  Branch (312:17): [True: 0, False: 0]
  Branch (312:46): [True: 0, False: 0]
  Branch (312:17): [True: 0, False: 0]
  Branch (312:46): [True: 0, False: 0]
313
                /* pop_back() */
314
0
                assert(sim[idx].back() == real[idx].back());
  Branch (314:17): [True: 0, False: 0]
  Branch (314:17): [True: 0, False: 0]
  Branch (314:17): [True: 0, False: 0]
  Branch (314:17): [True: 0, False: 0]
  Branch (314:17): [True: 0, False: 0]
  Branch (314:17): [True: 0, False: 0]
  Branch (314:17): [True: 0, False: 0]
315
0
                size_t old_size = real[idx].size();
316
0
                sim[idx].pop_back();
317
0
                real[idx].pop_back();
318
0
                assert(real[idx].size() == old_size - 1);
  Branch (318:17): [True: 0, False: 0]
  Branch (318:17): [True: 0, False: 0]
  Branch (318:17): [True: 0, False: 0]
  Branch (318:17): [True: 0, False: 0]
  Branch (318:17): [True: 0, False: 0]
  Branch (318:17): [True: 0, False: 0]
  Branch (318:17): [True: 0, False: 0]
319
0
                break;
320
0
            }
321
0
        }
322
0
    }
323
324
    /* Fully compare the final state. */
325
0
    for (unsigned i = 0; i < sim.size(); ++i) {
  Branch (325:26): [True: 0, False: 0]
  Branch (325:26): [True: 0, False: 0]
  Branch (325:26): [True: 0, False: 0]
  Branch (325:26): [True: 0, False: 0]
  Branch (325:26): [True: 0, False: 0]
  Branch (325:26): [True: 0, False: 0]
  Branch (325:26): [True: 0, False: 0]
326
        // Make sure const getters work.
327
0
        const VecDeque<T>& realbuf = real[i];
328
0
        const std::deque<T>& simbuf = sim[i];
329
0
        compare_fn(realbuf, simbuf);
330
0
        for (unsigned j = 0; j < sim.size(); ++j) {
  Branch (330:30): [True: 0, False: 0]
  Branch (330:30): [True: 0, False: 0]
  Branch (330:30): [True: 0, False: 0]
  Branch (330:30): [True: 0, False: 0]
  Branch (330:30): [True: 0, False: 0]
  Branch (330:30): [True: 0, False: 0]
  Branch (330:30): [True: 0, False: 0]
331
0
            assert((realbuf == real[j]) == (simbuf == sim[j]));
  Branch (331:13): [True: 0, False: 0]
  Branch (331:13): [True: 0, False: 0]
  Branch (331:13): [True: 0, False: 0]
  Branch (331:13): [True: 0, False: 0]
  Branch (331:13): [True: 0, False: 0]
  Branch (331:13): [True: 0, False: 0]
  Branch (331:13): [True: 0, False: 0]
332
0
            assert(((realbuf <=> real[j]) >= 0) == (simbuf >= sim[j]));
  Branch (332:13): [True: 0, False: 0]
  Branch (332:13): [True: 0, False: 0]
  Branch (332:13): [True: 0, False: 0]
  Branch (332:13): [True: 0, False: 0]
  Branch (332:13): [True: 0, False: 0]
  Branch (332:13): [True: 0, False: 0]
  Branch (332:13): [True: 0, False: 0]
333
0
            assert(((realbuf <=> real[j]) <= 0) == (simbuf <= sim[j]));
  Branch (333:13): [True: 0, False: 0]
  Branch (333:13): [True: 0, False: 0]
  Branch (333:13): [True: 0, False: 0]
  Branch (333:13): [True: 0, False: 0]
  Branch (333:13): [True: 0, False: 0]
  Branch (333:13): [True: 0, False: 0]
  Branch (333:13): [True: 0, False: 0]
334
0
        }
335
        // Clear out the buffers so we can check below that no objects exist anymore.
336
0
        sim[i].clear();
337
0
        real[i].clear();
338
0
    }
339
340
0
    if constexpr (CheckNoneLeft) {
341
0
        tmp = std::nullopt;
342
0
        T::CheckNoneExist();
343
0
    }
344
0
}
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_18TestTypeIhLb0EEEvSt4spanIKhLm18446744073709551615EEm
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_18TestTypeItLb0EEEvSt4spanIKhLm18446744073709551615EEm
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_18TestTypeIjLb0EEEvSt4spanIKhLm18446744073709551615EEm
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_18TestTypeImLb0EEEvSt4spanIKhLm18446744073709551615EEm
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_18TestTypeINS_10TrackedObjILm1EEELb1EEEvSt4spanIKhLm18446744073709551615EEm
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_18TestTypeINS_10TrackedObjILm3EEELb1EEEvSt4spanIKhLm18446744073709551615EEm
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_18TestTypeINS_10TrackedObjILm17EEELb1EEEvSt4spanIKhLm18446744073709551615EEm
345
346
/** Data structure with built-in tracking of all existing objects. */
347
template<size_t Size>
348
class TrackedObj
349
{
350
    static_assert(Size > 0);
351
352
    /* Data type for map that actually stores the object data.
353
     *
354
     * The key is a pointer to the TrackedObj, the value is the uint64_t it was initialized with.
355
     * Default-constructed and moved-from objects hold an std::nullopt.
356
     */
357
    using track_map_type = std::map<const TrackedObj<Size>*, std::optional<uint64_t>>;
358
359
private:
360
361
    /** Actual map. */
362
    static inline track_map_type g_tracker;
363
364
    /** Iterators into the tracker map for this object.
365
     *
366
     * This is an array of size Size, all holding the same value, to give the object configurable
367
     * size. The value is g_tracker.end() if this object is not fully initialized. */
368
    typename track_map_type::iterator m_track_entry[Size];
369
370
    void Check() const
371
0
    {
372
0
        auto it = g_tracker.find(this);
373
0
        for (size_t i = 0; i < Size; ++i) {
  Branch (373:28): [True: 0, False: 0]
  Branch (373:28): [True: 0, False: 0]
  Branch (373:28): [True: 0, False: 0]
374
0
            assert(m_track_entry[i] == it);
  Branch (374:13): [True: 0, False: 0]
  Branch (374:13): [True: 0, False: 0]
  Branch (374:13): [True: 0, False: 0]
375
0
        }
376
0
    }
Unexecuted instantiation: vecdeque.cpp:_ZNK12_GLOBAL__N_110TrackedObjILm1EE5CheckEv
Unexecuted instantiation: vecdeque.cpp:_ZNK12_GLOBAL__N_110TrackedObjILm3EE5CheckEv
Unexecuted instantiation: vecdeque.cpp:_ZNK12_GLOBAL__N_110TrackedObjILm17EE5CheckEv
377
378
    /** Create entry for this object in g_tracker and populate m_track_entry. */
379
    void Register()
380
0
    {
381
0
        auto [it, inserted] = g_tracker.emplace(this, std::nullopt);
382
0
        assert(inserted);
  Branch (382:9): [True: 0, False: 0]
  Branch (382:9): [True: 0, False: 0]
  Branch (382:9): [True: 0, False: 0]
383
0
        for (size_t i = 0; i < Size; ++i) {
  Branch (383:28): [True: 0, False: 0]
  Branch (383:28): [True: 0, False: 0]
  Branch (383:28): [True: 0, False: 0]
384
0
            m_track_entry[i] = it;
385
0
        }
386
0
    }
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm1EE8RegisterEv
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm3EE8RegisterEv
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm17EE8RegisterEv
387
388
    void Deregister()
389
0
    {
390
0
        Check();
391
0
        assert(m_track_entry[0] != g_tracker.end());
  Branch (391:9): [True: 0, False: 0]
  Branch (391:9): [True: 0, False: 0]
  Branch (391:9): [True: 0, False: 0]
392
0
        g_tracker.erase(m_track_entry[0]);
393
0
        for (size_t i = 0; i < Size; ++i) {
  Branch (393:28): [True: 0, False: 0]
  Branch (393:28): [True: 0, False: 0]
  Branch (393:28): [True: 0, False: 0]
394
0
            m_track_entry[i] = g_tracker.end();
395
0
        }
396
0
    }
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm1EE10DeregisterEv
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm3EE10DeregisterEv
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm17EE10DeregisterEv
397
398
    /** Get value corresponding to this object in g_tracker. */
399
    std::optional<uint64_t>& Deref()
400
0
    {
401
0
        Check();
402
0
        assert(m_track_entry[0] != g_tracker.end());
  Branch (402:9): [True: 0, False: 0]
  Branch (402:9): [True: 0, False: 0]
  Branch (402:9): [True: 0, False: 0]
403
0
        return m_track_entry[0]->second;
404
0
    }
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm1EE5DerefEv
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm3EE5DerefEv
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm17EE5DerefEv
405
406
    /** Get value corresponding to this object in g_tracker. */
407
    const std::optional<uint64_t>& Deref() const
408
0
    {
409
0
        Check();
410
0
        assert(m_track_entry[0] != g_tracker.end());
  Branch (410:9): [True: 0, False: 0]
  Branch (410:9): [True: 0, False: 0]
  Branch (410:9): [True: 0, False: 0]
411
0
        return m_track_entry[0]->second;
412
0
    }
Unexecuted instantiation: vecdeque.cpp:_ZNK12_GLOBAL__N_110TrackedObjILm1EE5DerefEv
Unexecuted instantiation: vecdeque.cpp:_ZNK12_GLOBAL__N_110TrackedObjILm3EE5DerefEv
Unexecuted instantiation: vecdeque.cpp:_ZNK12_GLOBAL__N_110TrackedObjILm17EE5DerefEv
413
414
public:
415
0
    ~TrackedObj() { Deregister(); }
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm1EED2Ev
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm3EED2Ev
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm17EED2Ev
416
0
    TrackedObj() { Register(); }
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm1EEC2Ev
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm3EEC2Ev
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm17EEC2Ev
417
418
    TrackedObj(uint64_t value)
419
0
    {
420
0
        Register();
421
0
        Deref() = value;
422
0
    }
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm1EEC2Em
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm3EEC2Em
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm17EEC2Em
423
424
    TrackedObj(const TrackedObj& other)
425
0
    {
426
0
        Register();
427
0
        Deref() = other.Deref();
428
0
    }
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm1EEC2ERKS1_
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm3EEC2ERKS1_
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm17EEC2ERKS1_
429
430
    TrackedObj(TrackedObj&& other)
431
0
    {
432
0
        Register();
433
0
        Deref() = other.Deref();
434
0
        other.Deref() = std::nullopt;
435
0
    }
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm1EEC2EOS1_
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm3EEC2EOS1_
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm17EEC2EOS1_
436
437
    TrackedObj& operator=(const TrackedObj& other)
438
0
    {
439
0
        if (this == &other) return *this;
  Branch (439:13): [True: 0, False: 0]
  Branch (439:13): [True: 0, False: 0]
  Branch (439:13): [True: 0, False: 0]
440
0
        Deref() = other.Deref();
441
0
        return *this;
442
0
    }
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm1EEaSERKS1_
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm3EEaSERKS1_
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm17EEaSERKS1_
443
444
    TrackedObj& operator=(TrackedObj&& other)
445
0
    {
446
0
        if (this == &other) return *this;
  Branch (446:13): [True: 0, False: 0]
  Branch (446:13): [True: 0, False: 0]
  Branch (446:13): [True: 0, False: 0]
447
0
        Deref() = other.Deref();
448
0
        other.Deref() = std::nullopt;
449
0
        return *this;
450
0
    }
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm1EEaSEOS1_
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm3EEaSEOS1_
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm17EEaSEOS1_
451
452
    friend bool operator==(const TrackedObj& a, const TrackedObj& b)
453
0
    {
454
0
        return a.Deref() == b.Deref();
455
0
    }
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_1eqERKNS_10TrackedObjILm1EEES3_
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_1eqERKNS_10TrackedObjILm3EEES3_
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_1eqERKNS_10TrackedObjILm17EEES3_
456
457
    friend std::strong_ordering operator<=>(const TrackedObj& a, const TrackedObj& b)
458
0
    {
459
        // Libc++ 15 & 16 do not support std::optional<T>::operator<=> yet. See
460
        // https://reviews.llvm.org/D146392.
461
0
        if (!a.Deref().has_value() || !b.Deref().has_value()) {
  Branch (461:13): [True: 0, False: 0]
  Branch (461:39): [True: 0, False: 0]
  Branch (461:13): [True: 0, False: 0]
  Branch (461:39): [True: 0, False: 0]
  Branch (461:13): [True: 0, False: 0]
  Branch (461:39): [True: 0, False: 0]
462
0
            return a.Deref().has_value() <=> b.Deref().has_value();
463
0
        }
464
0
        return *a.Deref() <=> *b.Deref();
465
0
    }
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_1ssERKNS_10TrackedObjILm1EEES3_
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_1ssERKNS_10TrackedObjILm3EEES3_
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_1ssERKNS_10TrackedObjILm17EEES3_
466
467
    static void CheckNoneExist()
468
0
    {
469
0
        assert(g_tracker.empty());
  Branch (469:9): [True: 0, False: 0]
  Branch (469:9): [True: 0, False: 0]
  Branch (469:9): [True: 0, False: 0]
470
0
    }
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm1EE14CheckNoneExistEv
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm3EE14CheckNoneExistEv
Unexecuted instantiation: vecdeque.cpp:_ZN12_GLOBAL__N_110TrackedObjILm17EE14CheckNoneExistEv
471
};
472
473
} // namespace
474
475
FUZZ_TARGET(vecdeque)
476
0
{
477
    // Run the test with simple uints (which satisfy all the trivial properties).
478
0
    static_assert(std::is_trivially_copyable_v<uint32_t>);
479
0
    static_assert(std::is_trivially_destructible_v<uint64_t>);
480
0
    TestType<uint8_t, false>(buffer, 1);
481
0
    TestType<uint16_t, false>(buffer, 2);
482
0
    TestType<uint32_t, false>(buffer, 3);
483
0
    TestType<uint64_t, false>(buffer, 4);
484
485
    // Run the test with TrackedObjs (which do not).
486
0
    static_assert(!std::is_trivially_copyable_v<TrackedObj<3>>);
487
0
    static_assert(!std::is_trivially_destructible_v<TrackedObj<17>>);
488
0
    TestType<TrackedObj<1>, true>(buffer, 5);
489
0
    TestType<TrackedObj<3>, true>(buffer, 6);
490
0
    TestType<TrackedObj<17>, true>(buffer, 7);
491
0
}