GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 92.9% 26 / 0 / 28
Functions: 100.0% 1 / 0 / 1
Branches: 73.7% 42 / 0 / 57

src/energyplus/ReverseTranslator/ReverseTranslateCurveExponentialSkewNormal.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 "../ReverseTranslator.hpp"
7
8 #include "../../model/CurveExponentialSkewNormal.hpp"
9 #include "../../model/CurveExponentialSkewNormal_Impl.hpp"
10
11 #include <utilities/idd/Curve_ExponentialSkewNormal_FieldEnums.hxx>
12
13 using namespace openstudio::model;
14
15 namespace openstudio {
16 namespace energyplus {
17
18 4 boost::optional<ModelObject> ReverseTranslator::translateCurveExponentialSkewNormal(const WorkspaceObject& workspaceObject) {
19
1/1
✓ Branch 1 taken 4 times.
4 CurveExponentialSkewNormal curve(m_model);
20
21 4 OptionalString s;
22 4 OptionalDouble d;
23
24
2/3
✓ Branch 1 taken 4 times.
✓ Branch 5 taken 4 times.
✗ Branch 6 not taken.
8 if ((s = workspaceObject.name())) {
25
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 curve.setName(*s);
26 }
27
28
2/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
8 if ((d = workspaceObject.getDouble(Curve_ExponentialSkewNormalFields::Coefficient1C1))) {
29
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 curve.setCoefficient1C1(*d);
30 }
31
2/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
8 if ((d = workspaceObject.getDouble(Curve_ExponentialSkewNormalFields::Coefficient2C2))) {
32
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 curve.setCoefficient2C2(*d);
33 }
34
2/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
8 if ((d = workspaceObject.getDouble(Curve_ExponentialSkewNormalFields::Coefficient3C3))) {
35
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 curve.setCoefficient3C3(*d);
36 }
37
2/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
8 if ((d = workspaceObject.getDouble(Curve_ExponentialSkewNormalFields::Coefficient4C4))) {
38
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 curve.setCoefficient4C4(*d);
39 }
40
2/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
8 if ((d = workspaceObject.getDouble(Curve_ExponentialSkewNormalFields::MinimumValueofx))) {
41
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 curve.setMinimumValueofx(*d);
42 }
43
2/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
8 if ((d = workspaceObject.getDouble(Curve_ExponentialSkewNormalFields::MaximumValueofx))) {
44
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 curve.setMaximumValueofx(*d);
45 }
46
2/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
8 if ((d = workspaceObject.getDouble(Curve_ExponentialSkewNormalFields::MinimumCurveOutput))) {
47
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 curve.setMinimumCurveOutput(*d);
48 }
49
2/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
8 if ((d = workspaceObject.getDouble(Curve_ExponentialSkewNormalFields::MaximumCurveOutput))) {
50
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 curve.setMaximumCurveOutput(*d);
51 }
52
2/3
✓ Branch 1 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 4 times.
8 if ((s = workspaceObject.getString(Curve_ExponentialSkewNormalFields::InputUnitTypeforx, false, true))) {
53 ✗ curve.setInputUnitTypeforx(*s);
54 }
55
2/3
✓ Branch 1 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 4 times.
8 if ((s = workspaceObject.getString(Curve_ExponentialSkewNormalFields::OutputUnitType, false, true))) {
56 ✗ curve.setOutputUnitType(*s);
57 }
58
59
1/1
✓ Branch 1 taken 4 times.
8 return curve;
60 4 }
61
62 } // namespace energyplus
63 } // namespace openstudio
64