GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 66.7% 12 / 0 / 18
Functions: 71.4% 5 / 0 / 7
Branches: 55.6% 5 / 0 / 9

src/model/PhotovoltaicPerformance.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 "PhotovoltaicPerformance.hpp"
7 #include "PhotovoltaicPerformance_Impl.hpp"
8 #include "GeneratorPhotovoltaic.hpp"
9 #include "ModelObject.hpp"
10 #include "ModelObject_Impl.hpp"
11 #include "Model.hpp"
12 #include "Model_Impl.hpp"
13
14 #include "../utilities/core/Assert.hpp"
15
16 namespace openstudio {
17
18 namespace model {
19
20 namespace detail {
21
22 ✗ PhotovoltaicPerformance_Impl::PhotovoltaicPerformance_Impl(IddObjectType type, Model_Impl* model) : ModelObject_Impl(type, model) {}
23
24 30 PhotovoltaicPerformance_Impl::PhotovoltaicPerformance_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
25 30 : ModelObject_Impl(idfObject, model, keepHandle) {}
26
27 ✗ PhotovoltaicPerformance_Impl::PhotovoltaicPerformance_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model,
28 ✗ bool keepHandle)
29 ✗ : ModelObject_Impl(other, model, keepHandle) {}
30
31 7 PhotovoltaicPerformance_Impl::PhotovoltaicPerformance_Impl(const PhotovoltaicPerformance_Impl& other, Model_Impl* model, bool keepHandles)
32 7 : ModelObject_Impl(other, model, keepHandles) {}
33
34 3 std::vector<openstudio::IdfObject> PhotovoltaicPerformance_Impl::remove() {
35 3 std::vector<openstudio::IdfObject> result;
36
37
3/4
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 3 times.
3 if (getSources(GeneratorPhotovoltaic::iddObjectType()).empty()) {
38 ✗ result = ModelObject_Impl::remove();
39 }
40
41 3 return result;
42 ✗ }
43
44 } // namespace detail
45
46 30 PhotovoltaicPerformance::PhotovoltaicPerformance(IddObjectType type, const Model& model) : ModelObject(type, model) {
47
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 30 times.
✗ Branch 5 not taken.
30 OS_ASSERT(getImpl<detail::PhotovoltaicPerformance_Impl>());
48 30 }
49
50
1/1
✓ Branch 3 taken 34 times.
34 PhotovoltaicPerformance::PhotovoltaicPerformance(std::shared_ptr<detail::PhotovoltaicPerformance_Impl> p) : ModelObject(std::move(p)) {}
51
52 } // namespace model
53
54 } // namespace openstudio
55