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 96338 Handle applyHandleMap(const Handle& original, const HandleMap& handleMap) {
11
1/1
✓ Branch 1 taken 96338 times.
96338 Handle result;
12
1/1
✓ Branch 1 taken 96338 times.
96338 auto it = handleMap.find(original);
13
2/2
✓ Branch 2 taken 26366 times.
✓ Branch 3 taken 69972 times.
96338 if (it != handleMap.end()) {
14 26366 result = it->second;
15 }
16 96338 return result;
17 }
18
19 10122 HandleVector applyHandleMap(const HandleVector& original, const HandleMap& handleMap) {
20 10122 HandleVector result;
21
2/2
✓ Branch 5 taken 8520 times.
✓ Branch 6 taken 10122 times.
18642 for (const Handle& oh : original) {
22
1/1
✓ Branch 1 taken 8520 times.
8520 auto it = handleMap.find(oh);
23
2/2
✓ Branch 2 taken 8262 times.
✓ Branch 3 taken 258 times.
8520 if (it != handleMap.end()) {
24
1/1
✓ Branch 2 taken 8262 times.
8262 result.push_back(it->second);
25 }
26 }
27 10122 return result;
28 ✗ }
29
30 } // namespace openstudio
31