aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests/logging.cpp
diff options
context:
space:
mode:
authormj-xmr <mjxmr@protonmail.com>2021-03-02 09:36:04 +0100
committermj-xmr <mjxmr@protonmail.com>2021-08-03 17:10:21 +0200
commitb2c59af84de8d35c1eee38878053206a62756968 (patch)
treee09c93fe129927f09fc6adeaf0927d28910172c0 /tests/unit_tests/logging.cpp
parentMerge pull request #7796 (diff)
downloadmonero-b2c59af84de8d35c1eee38878053206a62756968.tar.xz
EasyLogging++: new anti-UB test and propagating exception
Diffstat (limited to 'tests/unit_tests/logging.cpp')
-rw-r--r--tests/unit_tests/logging.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit_tests/logging.cpp b/tests/unit_tests/logging.cpp
index f11b17412..b3ffb9aa6 100644
--- a/tests/unit_tests/logging.cpp
+++ b/tests/unit_tests/logging.cpp
@@ -208,3 +208,10 @@ TEST(logging, operator_equals_segfault)
el::Logger log2("id2", nullptr);
log2 = log1;
}
+
+TEST(logging, empty_configurations_throws)
+{
+ el::Logger log1("id1", nullptr);
+ const el::Configurations cfg;
+ EXPECT_ANY_THROW(log1.configure(cfg));
+}