summaryrefslogtreecommitdiffstats
path: root/test/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/test_headers_cpp.cpp2
-rw-r--r--test/cpp/test_path_std.cpp16
2 files changed, 15 insertions, 3 deletions
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;
+}