commit | 3688d72de58fc2fa1d3d373588c589100d7acfe7 | [log] [tgz] |
---|---|---|
author | Junxiao Shi <git@mail1.yoursunny.com> | Tue Apr 10 05:04:45 2018 +0000 |
committer | Junxiao Shi <git@mail1.yoursunny.com> | Tue Apr 10 05:04:45 2018 +0000 |
tree | 4d5796a3aaffaf342c451ed6e5616dba1deb74ad | |
parent | 25038f3034445c4554c48fca4dd1ff0b26a2a353 [diff] |
util: backport optional::reset refs #3753 Change-Id: I17e77d7b7e3c450fc86aec06f5c2d3ecfcc1444a
diff --git a/tests/unit-tests/util/backports.t.cpp b/tests/unit-tests/util/backports.t.cpp index 3722834..629c3ee 100644 --- a/tests/unit-tests/util/backports.t.cpp +++ b/tests/unit-tests/util/backports.t.cpp
@@ -226,6 +226,13 @@ BOOST_CHECK_EQUAL(static_cast<bool>(o2), false); } +BOOST_AUTO_TEST_CASE(Reset) +{ + optional<int> o1(1); + o1.reset(); + BOOST_CHECK_EQUAL(static_cast<bool>(o1), false); +} + BOOST_AUTO_TEST_CASE(Emplace) { optional<std::pair<int, int>> o1;