feat(third_party): add oatpp,googltest,benchmark
All checks were successful
sm-rpc / build (Debug, aarch64-linux-gnu) (push) Successful in 1m7s
sm-rpc / build (Debug, arm-linux-gnueabihf) (push) Successful in 1m15s
sm-rpc / build (Debug, host.gcc) (push) Successful in 1m4s
sm-rpc / build (Debug, mipsel-linux-gnu) (push) Successful in 1m16s
sm-rpc / build (Release, aarch64-linux-gnu) (push) Successful in 1m34s
sm-rpc / build (Release, arm-linux-gnueabihf) (push) Successful in 1m33s
sm-rpc / build (Release, host.gcc) (push) Successful in 1m23s
sm-rpc / build (Release, mipsel-linux-gnu) (push) Successful in 1m30s

This commit is contained in:
tqcq
2025-08-19 17:18:53 +08:00
commit ea9d7b5f8c
867 changed files with 204066 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#include "../src/benchmark_runner.h"
#include "gtest/gtest.h"
namespace {
TEST(ParseMinTimeTest, InvalidInput) {
#if GTEST_HAS_DEATH_TEST
// Tests only runnable in debug mode (when BM_CHECK is enabled).
#ifndef NDEBUG
#ifndef TEST_BENCHMARK_LIBRARY_HAS_NO_ASSERTIONS
ASSERT_DEATH_IF_SUPPORTED(
{ benchmark::internal::ParseBenchMinTime("abc"); },
"Malformed seconds value passed to --benchmark_min_time: `abc`");
ASSERT_DEATH_IF_SUPPORTED(
{ benchmark::internal::ParseBenchMinTime("123ms"); },
"Malformed seconds value passed to --benchmark_min_time: `123ms`");
ASSERT_DEATH_IF_SUPPORTED(
{ benchmark::internal::ParseBenchMinTime("1z"); },
"Malformed seconds value passed to --benchmark_min_time: `1z`");
ASSERT_DEATH_IF_SUPPORTED(
{ benchmark::internal::ParseBenchMinTime("1hs"); },
"Malformed seconds value passed to --benchmark_min_time: `1hs`");
#endif
#endif
#endif
}
} // namespace