summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-03-16 00:53:47 +0100
committerlouiz’ <louiz@louiz.org>2018-03-16 01:13:50 +0100
commitba879a882e031d7b8503f78fe41d1210000c96ca (patch)
treee5e4f8055e73437318a36bddebd1c6d426fdce8e /tests
parent3f088e7b3a1467a88e7c5ff9fb60dc4609d2bfa3 (diff)
downloadbiboumi-ba879a882e031d7b8503f78fe41d1210000c96ca.tar.gz
biboumi-ba879a882e031d7b8503f78fe41d1210000c96ca.tar.bz2
biboumi-ba879a882e031d7b8503f78fe41d1210000c96ca.tar.xz
biboumi-ba879a882e031d7b8503f78fe41d1210000c96ca.zip
Use std::optional<bool> instead of OptionalBool
Diffstat (limited to 'tests')
-rw-r--r--tests/database.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/database.cpp b/tests/database.cpp
index 7ab6da8..88b4834 100644
--- a/tests/database.cpp
+++ b/tests/database.cpp
@@ -56,13 +56,13 @@ TEST_CASE("Database")
CHECK(o.col<Database::EncodingIn>() == "");
o.col<Database::EncodingIn>() = "ISO-8859-1";
- CHECK(o.col<Database::RecordHistoryOptional>().is_set == false);
- o.col<Database::RecordHistoryOptional>().set_value(false);
+ CHECK(!o.col<Database::RecordHistoryOptional>());
+ o.col<Database::RecordHistoryOptional>() = false;
o.save(Database::db);
auto b = Database::get_irc_channel_options("zouzou@example.com", "irc.example.com", "#foo");
CHECK(o.col<Database::EncodingIn>() == "ISO-8859-1");
- CHECK(o.col<Database::RecordHistoryOptional>().is_set == true);
- CHECK(o.col<Database::RecordHistoryOptional>().value == false);
+ CHECK(o.col<Database::RecordHistoryOptional>());
+ CHECK(*o.col<Database::RecordHistoryOptional>() == false);
}
SECTION("Channel options with server default")