]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#487,!242] Addressed the review comments in the optional_unittest.cc
authorMarcin Siodelski <marcin@isc.org>
Thu, 28 Feb 2019 11:48:17 +0000 (12:48 +0100)
committerMarcin Siodelski <marcin@isc.org>
Thu, 28 Feb 2019 13:38:18 +0000 (08:38 -0500)
src/lib/util/tests/optional_unittest.cc

index d76de69d69e321dee28b7260214591cfef2fe44b..7aad5c9fe4b8a0240d92efa07c44467bc687d83e 100644 (file)
@@ -26,6 +26,7 @@ TEST(OptionalTest, constructor) {
     EXPECT_EQ(0, value2.get());
     EXPECT_TRUE(value2.unspecified());
 
+    // Use the non-default value for second parameter.
     Optional<bool> value3(true, true);
     EXPECT_TRUE(value3.get());
     EXPECT_TRUE(value3.unspecified());
@@ -46,9 +47,9 @@ TEST(OptionalTest, constructorString) {
 // This test checks if the assignment operator assigning an actual
 // value to the optional value works as expected.
 TEST(OptionalTest, assignValue) {
-    Optional<int> value(10);
+    Optional<int> value(10, true);
     EXPECT_EQ(10, value.get());
-    EXPECT_FALSE(value.unspecified());
+    EXPECT_TRUE(value.unspecified());
 
     // Assign a new value.
     value = 111;