From 6bf4b90c90f15f4ab60833bddf5b5756d1a6b1f6 Mon Sep 17 00:00:00 2001 From: Elizabeth Alexander Hunt Date: Thu, 2 Jul 2026 11:55:17 -0700 Subject: Init --- .../rands/build/_deps/fmt-src/test/test-main.cc | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Homework/cs3460/rands/build/_deps/fmt-src/test/test-main.cc (limited to 'Homework/cs3460/rands/build/_deps/fmt-src/test/test-main.cc') diff --git a/Homework/cs3460/rands/build/_deps/fmt-src/test/test-main.cc b/Homework/cs3460/rands/build/_deps/fmt-src/test/test-main.cc new file mode 100644 index 0000000..39d2789 --- /dev/null +++ b/Homework/cs3460/rands/build/_deps/fmt-src/test/test-main.cc @@ -0,0 +1,43 @@ +// Formatting library for C++ - test main function. +// +// Copyright (c) 2012 - present, Victor Zverovich +// All rights reserved. +// +// For the license information refer to format.h. + +#include + +#include "gtest/gtest.h" + +#ifdef _WIN32 +# include +#endif + +#ifdef _MSC_VER +# include +#endif + +int main(int argc, char** argv) { +#ifdef _WIN32 + // Don't display any error dialogs. This also suppresses message boxes + // on assertion failures in MinGW where _set_error_mode/CrtSetReportMode + // doesn't help. + SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | + SEM_NOOPENFILEERRORBOX); +#endif +#ifdef _MSC_VER + // Disable message boxes on assertion failures. + _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); + _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); + _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); + _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); +#endif + try { + testing::InitGoogleTest(&argc, argv); + testing::FLAGS_gtest_death_test_style = "threadsafe"; + return RUN_ALL_TESTS(); + } catch (...) { + // Catch all exceptions to make Coverity happy. + } + return EXIT_FAILURE; +} -- cgit v1.3