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