summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-03-17 17:28:47 +0100
committerlouiz’ <louiz@louiz.org>2018-03-17 17:28:47 +0100
commit03714c6cebf90dc7db8e3997a18cdd19e039c667 (patch)
treec7f32136db1a40492f18cbd635a1bab761d14ced /tests
parentd0e3c71b91f1a1c1780158789fd42b8ac7209495 (diff)
downloadbiboumi-03714c6cebf90dc7db8e3997a18cdd19e039c667.tar.gz
biboumi-03714c6cebf90dc7db8e3997a18cdd19e039c667.tar.bz2
biboumi-03714c6cebf90dc7db8e3997a18cdd19e039c667.tar.xz
biboumi-03714c6cebf90dc7db8e3997a18cdd19e039c667.zip
Revert "Use std::optional<bool> instead of OptionalBool"
This reverts commit ba879a882e031d7b8503f78fe41d1210000c96ca.
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 88b4834..7ab6da8 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>());
- o.col<Database::RecordHistoryOptional>() = false;
+ CHECK(o.col<Database::RecordHistoryOptional>().is_set == false);
+ o.col<Database::RecordHistoryOptional>().set_value(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>());
- CHECK(*o.col<Database::RecordHistoryOptional>() == false);
+ CHECK(o.col<Database::RecordHistoryOptional>().is_set == true);
+ CHECK(o.col<Database::RecordHistoryOptional>().value == false);
}
SECTION("Channel options with server default")