22 #include <boost/test/minimal.hpp>
30 int test_main(
int,
char *[] )
35 BOOST_CHECK(result.empty());
36 bool unwrapped =
false;
40 }
catch(std::runtime_error&) {
45 BOOST_CHECK(!unwrapped);
46 BOOST_CHECK(result.empty());
50 BOOST_CHECK(!result.empty());
52 BOOST_CHECK(result.value() ==
"hello world");
53 BOOST_CHECK(result.empty());
60 }
catch(std::runtime_error&) {
65 BOOST_CHECK(!unwrapped);
66 BOOST_CHECK(result.empty());
67 BOOST_CHECK(result.value_or(
"good bye") ==
"good bye");