-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix up uninitialized optional in getPastStepValuesForMeasure #5199
Conversation
I created a new docker image from this run at https://registry.hub.docker.com/layers/nrel/openstudio/dev-pr-5199/images/sha256-3ac0f35ab7e11412fd38b7cf462fdb80ee612bd6c46a9370383e89676fbdfa17?context=explore And I'm testing the changes in NREL/resstock#1243 https://github.com/NREL/resstock/actions/runs/9100830729/job/25017139837?pr=1243#step:9:146 is all green! |
36de778
to
cff0d74
Compare
{ | ||
const Json::Value stepValues = runner.getPastStepValuesForMeasure("non_existing"); | ||
EXPECT_EQ(0, stepValues.size()); // did not set step result as Success | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crashing in debug mode before fix, works after
$ Products/openstudio_measure_tests --gtest_filter=*OSRunner_getPastStepValues_step_name_not_initialized*
Running main() from gmock_main.cc
Note: Google Test filter = *OSRunner_getPastStepValues_step_name_not_initialized*
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from MeasureFixture
[ RUN ] MeasureFixture.OSRunner_getPastStepValues_step_name_not_initialized
openstudio_measure_tests: /home/julien/.conan2/p/b/boostfdc6e57e26853/p/include/boost/optional/optional.hpp:1270: boost::optional<T>::reference_type boost::optional<T>::get() [with T = std::__cxx11::basic_string<char>; boost::optional<T>::reference_type = std::__cxx11::basic_string<char>&]: Assertion `this->is_initialized()' failed.
Aborted (core dumped)
a65363a
to
879a7b6
Compare
…o optional not initialized ``` $ Products/openstudio_measure_tests --gtest_filter=*OSRunner_getPastStepValues_step_name_not_initialized* Running main() from gmock_main.cc Note: Google Test filter = *OSRunner_getPastStepValues_step_name_not_initialized* [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from MeasureFixture [ RUN ] MeasureFixture.OSRunner_getPastStepValues_step_name_not_initialized openstudio_measure_tests: /home/julien/.conan2/p/b/boostfdc6e57e26853/p/include/boost/optional/optional.hpp:1270: boost::optional<T>::reference_type boost::optional<T>::get() [with T = std::__cxx11::basic_string<char>; boost::optional<T>::reference_type = std::__cxx11::basic_string<char>&]: Assertion `this->is_initialized()' failed. Aborted (core dumped) ```
old code works with std::optional, but not boost::optional 1.79.0 cf https://gcc.godbolt.org/z/7Khs774rd
879a7b6
to
3c4c28d
Compare
CI Results for 3c4c28d:
|
Pull request overview
old code works with std::optional, but not boost::optional 1.79.0
cf https://gcc.godbolt.org/z/7Khs774rd
Pull Request Author
src/model/test
)src/energyplus/Test
)src/osversion/VersionTranslator.cpp
)Labels:
IDDChange
APIChange
Pull Request - Ready for CI
so that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.