| Line |
Branch |
Decision |
Call |
Exec |
Source |
| 1 |
|
|
|
|
#include "initializers/ConditionalInstructionsContainerInitializer.h" |
| 2 |
|
|
|
|
|
| 3 |
|
|
|
|
#include "instructions/BaseInstruction.h" |
| 4 |
|
|
|
|
#include "instructions/ConditionalInstructionsContainer.h" |
| 5 |
|
|
|
|
#include "initializers/Instructions.h" |
| 6 |
|
|
|
|
|
| 7 |
|
|
|
|
using namespace Chrysalis::Composer; |
| 8 |
|
|
|
|
|
| 9 |
|
|
|
4 |
ConditionalInstructionsContainerInitializer::ConditionalInstructionsContainerInitializer(const args::condition* condition) |
| 10 |
|
|
1/1
|
4 |
: condition_(condition) {} |
| 11 |
|
|
|
|
|
| 12 |
|
|
|
4 |
ConditionalInstructionsContainerInitializer::True ConditionalInstructionsContainerInitializer::operator<<(std::initializer_list<BaseInstruction*>&& instructions) const { |
| 13 |
|
|
5/5
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
|
4 |
return True(condition_, std::move(instructions)); |
| 14 |
|
|
|
|
} |
| 15 |
|
|
|
|
|
| 16 |
|
|
|
4 |
ConditionalInstructionsContainerInitializer::True::True(const args::condition* condition, std::initializer_list<BaseInstruction*>&& instructions) |
| 17 |
|
|
6/6
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
✓ Call 5 invoked.
|
4 |
: condition_(condition), instructions_(instructions) {} |
| 18 |
|
|
|
|
|
| 19 |
|
|
|
1 |
ConditionalInstructionsContainerInitializer::True::operator Chrysalis::BaseInstruction*() const { |
| 20 |
|
|
|
|
const auto trueInstructions = new BaseInstructionsContainer<BaseInstruction>( |
| 21 |
|
|
5/5
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
|
1 |
new OptionsContainer(Instructions::instructionsContainer->options()), |
| 22 |
|
|
5/6
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
✗ Call 5 not invoked.
|
1 |
new ExpressionsContainer(Instructions::instructionsContainer->expressions()) |
| 23 |
2/8
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 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 15 not invoked.
|
3 |
); |
| 24 |
2/2
✓ Branch 11 taken 1 times.
✓ Branch 12 taken 1 times.
|
2/2
✓ Decision 'true' taken 1 times.
✓ Decision 'false' taken 1 times.
|
11/11
✓ 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.
|
2 |
for (const auto& instruction: instructions_) { |
| 25 |
|
|
5/5
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
|
1 |
trueInstructions->add(instruction); |
| 26 |
|
|
|
|
} |
| 27 |
|
|
|
|
const auto falseInstructions = new BaseInstructionsContainer<BaseInstruction>( |
| 28 |
|
|
5/5
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
|
1 |
new OptionsContainer(Instructions::instructionsContainer->options()), |
| 29 |
|
|
5/6
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
✗ Call 5 not invoked.
|
1 |
new ExpressionsContainer(Instructions::instructionsContainer->expressions()) |
| 30 |
2/8
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 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 15 not invoked.
|
3 |
); |
| 31 |
1/4
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
|
|
4/5
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✗ Call 8 not invoked.
|
1 |
return new ConditionalInstructionsContainer(condition_, trueInstructions, falseInstructions); |
| 32 |
|
|
|
|
} |
| 33 |
|
|
|
|
|
| 34 |
|
|
|
3 |
Chrysalis::BaseInstruction* ConditionalInstructionsContainerInitializer::True::operator<<(std::initializer_list<BaseInstruction*>&& instructionBlocks) const { |
| 35 |
|
|
|
|
const auto trueInstructions = new BaseInstructionsContainer<BaseInstruction>( |
| 36 |
|
|
5/5
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
|
3 |
new OptionsContainer(Instructions::instructionsContainer->options()), |
| 37 |
|
|
5/6
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
✗ Call 5 not invoked.
|
3 |
new ExpressionsContainer(Instructions::instructionsContainer->expressions()) |
| 38 |
2/8
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
✓ Branch 7 taken 3 times.
✗ Branch 8 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 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 15 not invoked.
|
9 |
); |
| 39 |
2/2
✓ Branch 11 taken 3 times.
✓ Branch 12 taken 3 times.
|
2/2
✓ Decision 'true' taken 3 times.
✓ Decision 'false' taken 3 times.
|
11/11
✓ 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.
|
6 |
for (const auto& instruction: instructions_) { |
| 40 |
|
|
5/5
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
|
3 |
trueInstructions->add(instruction); |
| 41 |
|
|
|
|
} |
| 42 |
|
|
|
|
const auto falseInstructions = new BaseInstructionsContainer<BaseInstruction>( |
| 43 |
|
|
5/5
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
|
3 |
new OptionsContainer(Instructions::instructionsContainer->options()), |
| 44 |
|
|
5/6
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
✗ Call 5 not invoked.
|
3 |
new ExpressionsContainer(Instructions::instructionsContainer->expressions()) |
| 45 |
2/8
✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
✓ Branch 7 taken 3 times.
✗ Branch 8 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 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 15 not invoked.
|
9 |
); |
| 46 |
2/2
✓ Branch 7 taken 3 times.
✓ Branch 8 taken 3 times.
|
2/2
✓ Decision 'true' taken 3 times.
✓ Decision 'false' taken 3 times.
|
7/7
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
✓ Call 5 invoked.
✓ Call 6 invoked.
|
6 |
for (const auto& instruction: instructionBlocks) { |
| 47 |
|
|
5/5
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
|
3 |
falseInstructions->add(instruction); |
| 48 |
|
|
|
|
} |
| 49 |
1/4
✓ Branch 4 taken 3 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
|
|
4/5
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✗ Call 8 not invoked.
|
3 |
return new ConditionalInstructionsContainer(condition_, trueInstructions, falseInstructions); |
| 50 |
|
|
|
|
} |
| 51 |
|
|
|
|
|