29 namespace astrotypes {
55 FAIL() <<
"expected to be marked unset";
68 ASSERT_FALSE(opt.
is_set());
74 ASSERT_TRUE(const_opt.
is_set());
75 ASSERT_EQ(*const_opt, 100);
76 ASSERT_EQ(const_opt, 100);
77 ASSERT_NE(const_opt, 11);
83 ASSERT_TRUE(const_opt.
is_set());
84 ASSERT_TRUE(const_opt);
85 ASSERT_EQ(const_opt,
true);
86 ASSERT_NE(const_opt,
false);
89 ASSERT_TRUE(false_opt.
is_set());
90 ASSERT_FALSE(false_opt);
91 ASSERT_NE(false_opt,
true);
92 ASSERT_EQ(false_opt,
false);
94 ASSERT_FALSE(false_opt.
is_set());
TEST_F(OptionalTest, test_int)
void reset()
return to unset state
A simplified, faster, but less secure and less versatile version of boost::optional.
void reset()
return to unset state
bool is_set() const
if the value has been explicitly set then return true
bool is_set() const
if the value has been explicitly set then return true