Chrysalis - Project Composer Test Coverage


pattern/composer/
File: pattern/composer/src/PatternInstructions.cpp
Date: 2026-08-27 18:35:43
Lines:
14/15
93.3%
Functions:
3/3
100.0%
Branches:
5/14
35.7%
Decisions:
2/2
100.0%
Calls:
30/33
90.9%

Line Branch Decision Call Exec Source
1 #include "initializers/PatternInstructions.h"
2
3 #include "initializers/Instructions.h"
4
5 using namespace Chrysalis;
6
7 16 Composer::PatternInstructions::PatternInstructions(args::patterns* selectedPatterns) {
8 16 patterns = selectedPatterns;
9 ✗ instructions = new PatternInstructionsContainer(
10
5/6
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
✗ Call 5 not invoked.
16 new OptionsContainer(Instructions::instructionsContainer->options()),
11
5/6
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
✗ Call 5 not invoked.
16 new ExpressionsContainer(Instructions::instructionsContainer->expressions()),
12 patterns
13
3/10
✓ Branch 3 taken 16 times.
✗ Branch 4 not taken.
✓ Branch 7 taken 16 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 16 times.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
7/8
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 5 invoked.
✓ Call 6 invoked.
✓ Call 9 invoked.
✓ Call 10 invoked.
✗ Call 17 not invoked.
48 );
14 16 }
15
16 16 Composer::PatternInstructions::~PatternInstructions() {
17 16 patterns = nullptr;
18 16 instructions = nullptr;
19 16 }
20
21 16 BaseInstruction* Composer::PatternInstructions::operator<<(std::initializer_list<BasePatternInstruction*>&& patternInstructions) const {
22
2/2
✓ Branch 7 taken 69 times.
✓ Branch 8 taken 16 times.
2/2
✓ Decision 'true' taken 69 times.
✓ Decision 'false' taken 16 times.
7/7
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
✓ Call 5 invoked.
✓ Call 6 invoked.
85 for (const auto& instruction: patternInstructions) {
23
6/6
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
✓ Call 5 invoked.
69 instructions->add(instruction);
24 }
25 16 return instructions;
26 }
27