aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests/logging.cpp
diff options
context:
space:
mode:
authormj-xmr <mjxmr@protonmail.com>2021-07-05 17:42:11 +0200
committermj-xmr <mjxmr@protonmail.com>2021-07-06 06:50:52 +0200
commit5e6762d4591ed427715b1ad76b0737b6f59cf571 (patch)
tree7d7e2a40550ce34886f52e56ee82956db2aff68f /tests/unit_tests/logging.cpp
parentMerge pull request #7743 (diff)
downloadmonero-5e6762d4591ed427715b1ad76b0737b6f59cf571.tar.xz
EasyLogging++: Add UTests, that protect against regressions
Diffstat (limited to 'tests/unit_tests/logging.cpp')
-rw-r--r--tests/unit_tests/logging.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit_tests/logging.cpp b/tests/unit_tests/logging.cpp
index b3afba243..f11b17412 100644
--- a/tests/unit_tests/logging.cpp
+++ b/tests/unit_tests/logging.cpp
@@ -195,3 +195,16 @@ TEST(logging, multiline)
cleanup();
}
+// These operations might segfault
+TEST(logging, copy_ctor_segfault)
+{
+ const el::Logger log1("id1", nullptr);
+ const el::Logger log2(log1);
+}
+
+TEST(logging, operator_equals_segfault)
+{
+ const el::Logger log1("id1", nullptr);
+ el::Logger log2("id2", nullptr);
+ log2 = log1;
+}