7de8fd4b1b
Summary: Remove utils/stacktrace/log.hpp The single function defined in log.hpp is used only in memgraph_bolt.cpp. Therefore, the function has been moved and the file removed. Move utils/stacktrace/stacktrace.hpp one level up Move some logging from memgraph_bolt to Server Reviewers: buda, dtomicevic Reviewed By: buda Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D465
24 lines
532 B
C++
24 lines
532 B
C++
#include "gtest/gtest.h"
|
|
|
|
#include <iostream>
|
|
#include <string>
|
|
#include <utility>
|
|
|
|
#include "utils/signals/handler.hpp"
|
|
#include "utils/stacktrace.hpp"
|
|
|
|
TEST(SignalHandler, SegmentationFaultTest) {
|
|
SignalHandler::register_handler(Signal::SegmentationFault, []() {
|
|
std::cout << "Segmentation Fault" << std::endl;
|
|
Stacktrace stacktrace;
|
|
std::cout << stacktrace.dump() << std::endl;
|
|
});
|
|
|
|
std::raise(SIGSEGV);
|
|
}
|
|
|
|
int main(int argc, char **argv) {
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
return RUN_ALL_TESTS();
|
|
}
|