fix use threadsafe assert in gtest
Some checks failed
rpcrypto-build / build (Debug, hisiv510.toolchain.cmake) (push) Successful in 56s
rpcrypto-build / build (Release, hisiv510.toolchain.cmake) (push) Successful in 1m3s
rpcrypto-build / build (Debug, himix200.toolchain.cmake) (push) Successful in 1m7s
linux-mips64-gcc / linux-gcc-mips64el (push) Failing after 1m9s
rpcrypto-build / build (Release, himix200.toolchain.cmake) (push) Successful in 1m12s
linux-hisiv500-gcc / linux-gcc-hisiv500 (push) Successful in 1m26s
linux-x64-gcc / linux-gcc (push) Failing after 1m20s

This commit is contained in:
tqcq 2023-12-17 22:02:35 +08:00
parent 5d8b54be73
commit 46ea616707

View File

@ -49,5 +49,7 @@ TEST(CoundownLatch, Assert)
{
ulib::CountDownLatch latch(1);
latch.CountDown();
// NOTE https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads
GTEST_FLAG_SET(death_test_style, "threadsafe");
EXPECT_DEATH(latch.CountDown(), "Assertion.*");
}