Chrysalis - Pattern Test Coverage


pattern/
File: pattern/include/arguments/PatternsContainerArgument.h
Date: 2026-08-27 18:35:18
Lines:
5/11
45.5%
Functions:
5/8
62.5%
Branches:
2/6
33.3%
Decisions:
0/0
-%
Calls:
35/86
40.7%

Line Branch Decision Call Exec Source
1 #ifndef CHRYSALIS_PATTERNSCONTAINERARGUMENT_H
2 #define CHRYSALIS_PATTERNSCONTAINERARGUMENT_H
3
4 #include "PatternSpace.h"
5
6 /** @defgroup Arguments Arguments
7 * @{
8 */
9 namespace Chrysalis {
10 class PatternsContainerArgument: public AssociativeContainer<PatternSpace> {
11
5/5
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
2072 SERIALIZE_DERIVED_FROM(AssociativeContainer)
12 public:
13
5/5
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
522 explicit PatternsContainerArgument() = default;
14
8/8
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
✓ Call 5 invoked.
✓ Call 6 invoked.
✓ Call 7 invoked.
27 explicit PatternsContainerArgument(std::initializer_list<PatternSpace*>&& items): AssociativeContainer(items) {}
15
16 ✗ [[nodiscard]] bool empty() const {
17
0/7
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ return count() == 0;
18 }
19 template<typename... Args>
20 ✗ bool all(bool (PatternSpace::* check)(Args...) const, std::type_identity_t<Args>... args) const {
21
0/16
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ Call 13 not invoked.
✗ Call 14 not invoked.
✗ Call 15 not invoked.
✗ return std::all_of(begin(), end(), [&](const PatternSpace* item) {
22
0/23
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ Call 13 not invoked.
✗ Call 14 not invoked.
✗ Call 15 not invoked.
✗ Call 16 not invoked.
✗ Call 17 not invoked.
✗ Call 18 not invoked.
✗ Call 19 not invoked.
✗ Call 20 not invoked.
✗ Call 21 not invoked.
✗ Call 22 not invoked.
✗ Call 23 not invoked.
✗ Call 24 not invoked.
✗ return (item->*check)(args...);
23 ✗ });
24 }
25 template<typename R, typename... Args>
26 779 R onAny(R (PatternSpace::* method)(Args...) const, std::type_identity_t<Args>... args) const {
27
2/4
✓ Branch 11 taken 36 times.
✗ Branch 12 not taken.
✓ Branch 22 taken 36 times.
✗ Branch 23 not taken.
17/22
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
✓ Call 5 invoked.
✓ Call 6 invoked.
✓ Call 7 invoked.
✓ Call 8 invoked.
✓ Call 9 invoked.
✓ Call 10 invoked.
✗ Call 13 not invoked.
✗ Call 14 not invoked.
✗ Call 15 not invoked.
✗ Call 16 not invoked.
✓ Call 17 invoked.
✓ Call 18 invoked.
✓ Call 19 invoked.
✓ Call 20 invoked.
✓ Call 21 invoked.
✓ Call 24 invoked.
✗ Call 25 not invoked.
779 return (*begin()->*method)(args...);
28 }
29 };
30 namespace args {
31 using patterns = PatternsContainerArgument;
32 }
33 }
34 /**@}*/
35
36 #endif //CHRYSALIS_PATTERNSCONTAINERARGUMENT_H
37