diff --git a/src/energyplus/Test/ScheduleInterval_GTest.cpp b/src/energyplus/Test/ScheduleInterval_GTest.cpp index 25a540164d7..d101afeadac 100644 --- a/src/energyplus/Test/ScheduleInterval_GTest.cpp +++ b/src/energyplus/Test/ScheduleInterval_GTest.cpp @@ -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().size()); EXPECT_EQ(1u, model.getConcreteModelObjects().size()); ExternalFile externalfile = schedule.externalFile(); @@ -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().size()); EXPECT_EQ(1u, model.getConcreteModelObjects().size()); ExternalFile externalfile = schedule.externalFile(); @@ -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().size()); EXPECT_EQ(1u, model.getConcreteModelObjects().size()); ExternalFile externalfile = schedule.externalFile(); @@ -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().size()); EXPECT_EQ(1u, model.getConcreteModelObjects().size()); ExternalFile externalfile = schedule.externalFile(); diff --git a/src/model/test/ScheduleInterval_GTest.cpp b/src/model/test/ScheduleInterval_GTest.cpp index 9364696eadd..aa43f33b750 100644 --- a/src/model/test/ScheduleInterval_GTest.cpp +++ b/src/model/test/ScheduleInterval_GTest.cpp @@ -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 externalfile2 = ExternalFile::getExternalFile(model, openstudio::toString(p)); ASSERT_TRUE(externalfile2);