./
Coverage:
low: ≥ 0%
medium: ≥ 75.0%
high: ≥ 90.0%
Lines:
0 / 13
0.0%
Branches:
0 / 10
0.0%
Functions:
0 / 4
0.0%

libs/base/src/eu/base/hash.set.cc
Line Branch Exec Source
1 #include "eu/base/hash.set.h"
2
3 namespace eu
4 {
5 ✗ void HshSt::add(const Hsh& h)
6 {
7 ✗ data.emplace(h);
8 ✗ }
9
10 ✗ HshSt HshSt::combine(const Hsh& h) const
11 {
12
0/2
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 13 not taken.
✗ auto clone = data;
13
0/2
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 11 not taken.
✗ clone.emplace(h);
14
0/4
✗ Branch 4 → 5 not taken.
✗ Branch 4 → 11 not taken.
✗ Branch 6 → 7 not taken.
✗ Branch 6 → 8 not taken.
✗ return HshSt{.data = clone, .primary = h };
15 ✗ }
16
17 ✗ bool HshSt::contains(const Hsh& h) const
18 {
19
0/2
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 8 not taken.
✗ const auto found = data.find(h);
20 ✗ return found != data.end();
21 }
22
23 ✗ bool HshSt::is(const HshSt& h) const
24 {
25 ✗ return contains(h.primary);
26 }
27
28 }
29