summaryrefslogtreecommitdiffstats
path: root/test/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/.clang-tidy8
-rw-r--r--test/cpp/test_headers_cpp.cpp31
-rw-r--r--test/cpp/test_path_std.cpp14
3 files changed, 32 insertions, 21 deletions
diff --git a/test/cpp/.clang-tidy b/test/cpp/.clang-tidy
index 9a3cd8c..1cbcc07 100644
--- a/test/cpp/.clang-tidy
+++ b/test/cpp/.clang-tidy
@@ -1,13 +1,19 @@
-# Copyright 2020-2022 David Robillard <d@drobilla.net>
+# Copyright 2020-2025 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR ISC
Checks: >
-*-avoid-c-arrays,
-*-no-malloc,
+ -*-use-nullptr,
-android-cloexec-fopen,
+ -bugprone-exception-escape,
+ -cppcoreguidelines-macro-usage,
-cppcoreguidelines-owning-memory,
-fuchsia-default-arguments-calls,
-modernize-raw-string-literal,
+ -modernize-redundant-void-arg,
-modernize-use-trailing-return-type,
+ -modernize-use-using,
+ -performance-enum-size,
-readability-implicit-bool-conversion,
InheritParentConfig: true
diff --git a/test/cpp/test_headers_cpp.cpp b/test/cpp/test_headers_cpp.cpp
index f8038c1..fe367ad 100644
--- a/test/cpp/test_headers_cpp.cpp
+++ b/test/cpp/test_headers_cpp.cpp
@@ -5,21 +5,22 @@
# define WIN32_LEAN_AND_MEAN
#endif
-#include "zix/allocator.h" // IWYU pragma: keep
-#include "zix/attributes.h" // IWYU pragma: keep
-#include "zix/btree.h" // IWYU pragma: keep
-#include "zix/bump_allocator.h" // IWYU pragma: keep
-#include "zix/digest.h" // IWYU pragma: keep
-#include "zix/filesystem.h" // IWYU pragma: keep
-#include "zix/hash.h" // IWYU pragma: keep
-#include "zix/path.h" // IWYU pragma: keep
-#include "zix/ring.h" // IWYU pragma: keep
-#include "zix/sem.h" // IWYU pragma: keep
-#include "zix/status.h" // IWYU pragma: keep
-#include "zix/string_view.h" // IWYU pragma: keep
-#include "zix/thread.h" // IWYU pragma: keep
-#include "zix/tree.h" // IWYU pragma: keep
-#include "zix/zix.h" // IWYU pragma: keep
+#include <zix/allocator.h> // IWYU pragma: keep
+#include <zix/attributes.h> // IWYU pragma: keep
+#include <zix/btree.h> // IWYU pragma: keep
+#include <zix/bump_allocator.h> // IWYU pragma: keep
+#include <zix/digest.h> // IWYU pragma: keep
+#include <zix/environment.h> // IWYU pragma: keep
+#include <zix/filesystem.h> // IWYU pragma: keep
+#include <zix/hash.h> // IWYU pragma: keep
+#include <zix/path.h> // IWYU pragma: keep
+#include <zix/ring.h> // IWYU pragma: keep
+#include <zix/sem.h> // IWYU pragma: keep
+#include <zix/status.h> // IWYU pragma: keep
+#include <zix/string_view.h> // IWYU pragma: keep
+#include <zix/thread.h> // IWYU pragma: keep
+#include <zix/tree.h> // IWYU pragma: keep
+#include <zix/zix.h> // IWYU pragma: keep
#if defined(__GNUC__)
__attribute__((const))
diff --git a/test/cpp/test_path_std.cpp b/test/cpp/test_path_std.cpp
index cabf3da..b0850a9 100644
--- a/test/cpp/test_path_std.cpp
+++ b/test/cpp/test_path_std.cpp
@@ -10,15 +10,16 @@
#undef NDEBUG
-#include "zix/path.h"
-#include "zix/string_view.h"
+#include <zix/path.h>
+#include <zix/string_view.h>
#include <cassert>
#include <cstdlib>
#include <filesystem>
-#include <sstream>
#include <string>
+// IWYU pragma: no_include <version>
+
namespace {
struct BinaryCase {
@@ -483,8 +484,11 @@ run()
}
for (const auto& relatives : lexical_relatives) {
- const Path l = relatives.lhs ? Path{relatives.lhs} : Path{};
- const Path r = relatives.rhs ? Path{relatives.rhs} : Path{};
+ assert(relatives.lhs);
+ assert(relatives.rhs);
+
+ const Path l = Path{relatives.lhs};
+ const Path r = Path{relatives.rhs};
assert(match(
l.lexically_relative(r),