Final signal handler test and stacktrace update
This commit is contained in:
parent
b4c65d9680
commit
fcc1642cad
@ -60,10 +60,7 @@ public:
|
||||
|
||||
void dump(std::ostream& stream) {
|
||||
std::string message;
|
||||
for (int i = 0; i < size(); i++) {
|
||||
message.append(fmt::format("at {} ({})\n", lines[i].function,
|
||||
lines[i].location));
|
||||
}
|
||||
dump(message);
|
||||
stream << message;
|
||||
}
|
||||
|
||||
|
@ -13,12 +13,8 @@ TEST_CASE("SignalHandler Segmentation Fault Test") {
|
||||
std::cout << "Segmentation Fault" << std::endl;
|
||||
Stacktrace stacktrace;
|
||||
|
||||
int size = 10;
|
||||
std::string message;
|
||||
for (int i = 0; i < size; i++) {
|
||||
message.append(fmt::format("\n at {} ({})", stacktrace[i].function,
|
||||
stacktrace[i].location));
|
||||
}
|
||||
stacktrace.dump(message);
|
||||
std::cout << message << std::endl;
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user