GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 92.9% 13 / 0 / 14
Functions: 100.0% 2 / 0 / 2
Branches: 100.0% 10 / 0 / 10

src/utilities/idf/Handle.cpp
Line Branch Exec Source
1 /***********************************************************************************************************************
2 * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC.
3 * See also https://openstudio.net/license
4 ***********************************************************************************************************************/
5
6 #include "Handle.hpp"
7
8 namespace openstudio {
9
10 97246 Handle applyHandleMap(const Handle& original, const HandleMap& handleMap) {
11
1/1
✓ Branch 1 taken 97246 times.
97246 Handle result;
12
1/1
✓ Branch 1 taken 97246 times.
97246 auto it = handleMap.find(original);
13
2/2
✓ Branch 2 taken 26448 times.
✓ Branch 3 taken 70798 times.
97246 if (it != handleMap.end()) {
14 26448 result = it->second;
15 }
16 97246 return result;
17 }
18
19 10168 HandleVector applyHandleMap(const HandleVector& original, const HandleMap& handleMap) {
20 10168 HandleVector result;
21
2/2
✓ Branch 5 taken 8514 times.
✓ Branch 6 taken 10168 times.
18682 for (const Handle& oh : original) {
22
1/1
✓ Branch 1 taken 8514 times.
8514 auto it = handleMap.find(oh);
23
2/2
✓ Branch 2 taken 8256 times.
✓ Branch 3 taken 258 times.
8514 if (it != handleMap.end()) {
24
1/1
✓ Branch 2 taken 8256 times.
8256 result.push_back(it->second);
25 }
26 }
27 10168 return result;
28 ✗ }
29
30 } // namespace openstudio
31