Chrysalis - Pattern Test Coverage


pattern/
File: pattern/src/BaseNamedElement.cpp
Date: 2026-08-27 18:35:18
Lines:
5/13
38.5%
Functions:
3/6
50.0%
Branches:
0/0
-%
Decisions:
0/0
-%
Calls:
17/33
51.5%

Line Branch Decision Call Exec Source
1 #include "BaseNamedElement.h"
2
3 using namespace Chrysalis;
4
5
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.
21 BaseNamedElement::BaseNamedElement(const std::string& name): name_(name) {}
6
7 21 bool BaseNamedElement::hasAlias() const {
8
6/6
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
✓ Call 3 invoked.
✓ Call 4 invoked.
✓ Call 5 invoked.
21 return alias_.has_value();
9 }
10
11 21 const std::string& BaseNamedElement::getName() const {
12
3/3
✓ Call 0 invoked.
✓ Call 1 invoked.
✓ Call 2 invoked.
21 return name_;
13 }
14
15 ✗ const std::string& BaseNamedElement::getAlias() const {
16
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 alias_.get();
17 }
18
19 ✗ void BaseNamedElement::setName(const std::string& name) {
20
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ name_ = name;
21 ✗ }
22
23 ✗ void BaseNamedElement::setAlias(const std::string& alias) {
24
0/5
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ alias_ = alias;
25 ✗ }
26