• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

devmarkusb / util / 24307122488

12 Apr 2026 12:48PM UTC coverage: 92.235%. Remained the same
24307122488

push

github

MarkusB
Update pre-commit hook versions and fetchcontent lockfile

5880 of 6375 relevant lines covered (92.24%)

136.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

84.62
/src/basiccodesupport/crash.test.cpp
1
//! Note: quick_exit instead of exit because of clang thread safety warning.
2
#include "mb/ul/basiccodesupport/crash.hpp"
3
#include "mb/ul/buildenv/warnings.hpp"
4

5
#include "gtest/gtest.h"
6
#include <csignal>
7

8
UL_PRAGMA_WARNINGS_PUSH
9
UL_WARNING_DISABLE_CLANG(used-but-marked-unused)
10

11
namespace wrap {
12
namespace {
13
void exit(int status) {
×
14
#if UL_OS_MAC
15
    std::exit(status);
16
#else
17
    std::quick_exit(status);
×
18
#endif
19
}
20
} // namespace
21
} // namespace wrap
22

23
#if !defined(MB_DEVENV_SANITIZER)
24
#if UL_OS_WINDOWS
25
TEST(crashDeathTest, sigsegv) {
26
    EXPECT_DEATH(ul::crash(SIGSEGV), ".*");
27
    EXPECT_DEATH(ul::crash(SIGSEGV, false), ".*");
28
}
29
#else
30
TEST(crashDeathTest, sigsegv) {
4✔
31
    EXPECT_EXIT((ul::crash(SIGSEGV), wrap::exit(0)), ::testing::KilledBySignal(SIGSEGV), ".*");
1✔
32
    EXPECT_EXIT((ul::crash(SIGSEGV, false), wrap::exit(0)), ::testing::KilledBySignal(SIGSEGV), ".*");
1✔
33
}
1✔
34

35
TEST(crashDeathTest, sigabrt) {
4✔
36
    EXPECT_EXIT((ul::crash(SIGABRT), wrap::exit(0)), ::testing::KilledBySignal(SIGABRT), ".*");
1✔
37
    EXPECT_EXIT((ul::crash(SIGABRT, false), wrap::exit(0)), ::testing::KilledBySignal(SIGABRT), ".*");
1✔
38
}
1✔
39
#endif
40
#endif
41

42
TEST(crash, not_crashing) {
4✔
43
    EXPECT_EXIT((ul::crash(0), wrap::exit(0)), ::testing::ExitedWithCode(0), ".*");
1✔
44
}
1✔
45

46
UL_PRAGMA_WARNINGS_POP
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc