From 5a9787b4247c6735cc3213944945e8983002edf9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 4 Feb 2023 19:25:22 -0500 Subject: Suppress/fix clang-tidy warnings on Windows --- test/cpp/test_headers_cpp.cpp | 2 +- test/cpp/test_path_std.cpp | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'test/cpp') diff --git a/test/cpp/test_headers_cpp.cpp b/test/cpp/test_headers_cpp.cpp index 3fabe6e..f8038c1 100644 --- a/test/cpp/test_headers_cpp.cpp +++ b/test/cpp/test_headers_cpp.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: ISC #ifdef _WIN32 -# define WIN32_LEAN_AND_MEAN 1 +# define WIN32_LEAN_AND_MEAN #endif #include "zix/allocator.h" // IWYU pragma: keep diff --git a/test/cpp/test_path_std.cpp b/test/cpp/test_path_std.cpp index 50ccad4..6c0e450 100644 --- a/test/cpp/test_path_std.cpp +++ b/test/cpp/test_path_std.cpp @@ -433,8 +433,8 @@ equal(const std::filesystem::path& path, const ZixStringView view) path.u8string() == std::string{view.data, view.length}); } -int -main() +static void +run() { using Path = std::filesystem::path; @@ -493,3 +493,15 @@ main() zix_path_lexically_relative(nullptr, relatives.rhs, relatives.lhs))); } } + +int +main() +{ + try { + run(); + } catch (...) { + return 1; + } + + return 0; +} -- cgit v1.2.1