GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 6 / 0 / 6
Functions: 100.0% 1 / 0 / 1
Branches: 100.0% 6 / 0 / 6

src/energyplus/ForwardTranslator/ForwardTranslateTimestep.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 "../ForwardTranslator.hpp"
7 #include "../../model/Timestep.hpp"
8 #include <utilities/idd/Timestep_FieldEnums.hxx>
9 #include "../../utilities/idd/IddEnums.hpp"
10 #include <utilities/idd/IddEnums.hxx>
11
12 using namespace openstudio::model;
13
14 namespace openstudio {
15
16 namespace energyplus {
17
18 889 boost::optional<IdfObject> ForwardTranslator::translateTimestep(Timestep& modelObject) {
19
2/2
✓ Branch 1 taken 889 times.
✓ Branch 4 taken 889 times.
889 IdfObject idfObject(openstudio::IddObjectType::Timestep);
20
21
2/2
✓ Branch 1 taken 889 times.
✓ Branch 4 taken 889 times.
889 idfObject.setInt(TimestepFields::NumberofTimestepsperHour, modelObject.numberOfTimestepsPerHour());
22
23
1/1
✓ Branch 1 taken 889 times.
889 m_idfObjects.push_back(idfObject);
24
25
1/1
✓ Branch 1 taken 889 times.
1778 return boost::optional<IdfObject>(idfObject);
26 889 }
27
28 } // namespace energyplus
29
30 } // namespace openstudio
31