Skip to content

Commit

Permalink
Updates to model and ft tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-robertson committed Oct 27, 2023
1 parent 6451066 commit 0116c68
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/energyplus/Test/ScheduleInterval_GTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1870,6 +1870,7 @@ TEST_F(EnergyPlusFixture, ScheduleFileRelativePath) {
ASSERT_TRUE(external_file);
ScheduleFile schedule(*external_file);
EXPECT_TRUE(schedule.setTranslateFileName(true));
EXPECT_TRUE(schedule.translateFileName());
EXPECT_EQ(1u, model.getConcreteModelObjects<ScheduleFile>().size());
EXPECT_EQ(1u, model.getConcreteModelObjects<ExternalFile>().size());
ExternalFile externalfile = schedule.externalFile();
Expand Down Expand Up @@ -1904,6 +1905,7 @@ TEST_F(EnergyPlusFixture, ScheduleFileRelativePath) {
ASSERT_TRUE(external_file);
ScheduleFile schedule(*external_file);
EXPECT_TRUE(schedule.setTranslateFileName(true));
EXPECT_TRUE(schedule.translateFileName());
EXPECT_EQ(1u, model.getConcreteModelObjects<ScheduleFile>().size());
EXPECT_EQ(1u, model.getConcreteModelObjects<ExternalFile>().size());
ExternalFile externalfile = schedule.externalFile();
Expand Down Expand Up @@ -1936,6 +1938,7 @@ TEST_F(EnergyPlusFixture, ScheduleFileRelativePath) {

ScheduleFile schedule(model, openstudio::toString(p));
EXPECT_TRUE(schedule.setTranslateFileName(true));
EXPECT_TRUE(schedule.translateFileName());
EXPECT_EQ(1u, model.getConcreteModelObjects<ScheduleFile>().size());
EXPECT_EQ(1u, model.getConcreteModelObjects<ExternalFile>().size());
ExternalFile externalfile = schedule.externalFile();
Expand Down Expand Up @@ -1968,6 +1971,7 @@ TEST_F(EnergyPlusFixture, ScheduleFileRelativePath) {

ScheduleFile schedule(model, openstudio::toString(p));
EXPECT_TRUE(schedule.setTranslateFileName(true));
EXPECT_TRUE(schedule.translateFileName());
EXPECT_EQ(1u, model.getConcreteModelObjects<ScheduleFile>().size());
EXPECT_EQ(1u, model.getConcreteModelObjects<ExternalFile>().size());
ExternalFile externalfile = schedule.externalFile();
Expand Down
9 changes: 9 additions & 0 deletions src/model/test/ScheduleInterval_GTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,15 @@ TEST_F(ModelFixture, ScheduleFile) {
schedule3.resetAdjustScheduleforDaylightSavings();
EXPECT_TRUE(schedule3.isAdjustScheduleforDaylightSavingsDefaulted());

EXPECT_FALSE(schedule3.translateFileName());
EXPECT_TRUE(schedule3.isTranslateFileNameDefaulted());
EXPECT_TRUE(schedule3.setTranslateFileName(true));
EXPECT_TRUE(schedule3.translateFileName());
EXPECT_FALSE(schedule3.isTranslateFileNameDefaulted());
schedule3.resetTranslateFileName();
EXPECT_FALSE(schedule3.translateFileName());
EXPECT_TRUE(schedule3.isTranslateFileNameDefaulted());

// shouldn't create a new object
boost::optional<ExternalFile> externalfile2 = ExternalFile::getExternalFile(model, openstudio::toString(p));
ASSERT_TRUE(externalfile2);
Expand Down

0 comments on commit 0116c68

Please sign in to comment.