diff options
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/.clang-tidy | 1 | ||||
-rw-r--r-- | test/cpp/meson.build | 2 | ||||
-rw-r--r-- | test/cpp/test_build.cpp | 16 | ||||
-rw-r--r-- | test/cpp/test_inline_cpp.cpp | 26 | ||||
-rw-r--r-- | test/cpp/test_inline_objcpp.mm | 16 |
5 files changed, 30 insertions, 31 deletions
diff --git a/test/cpp/.clang-tidy b/test/cpp/.clang-tidy index 1d936a2..fe7d8ec 100644 --- a/test/cpp/.clang-tidy +++ b/test/cpp/.clang-tidy @@ -5,6 +5,7 @@ Checks: > -*-use-auto, -*-use-nullptr, -bugprone-easily-swappable-parameters, + -bugprone-suspicious-include, -cert-dcl50-cpp, -cppcoreguidelines-avoid-c-arrays, -cppcoreguidelines-avoid-do-while, diff --git a/test/cpp/meson.build b/test/cpp/meson.build index 73e2320..94c64d1 100644 --- a/test/cpp/meson.build +++ b/test/cpp/meson.build @@ -54,6 +54,7 @@ if host_machine.system() == 'darwin' 'test_inline_objcpp', 'test_inline_objcpp.mm', dependencies: unified_deps, + implicit_include_directories: false, include_directories: include_directories('../../include'), objcpp_args: objcpp_unified_args, ), @@ -99,6 +100,7 @@ elif is_variable('cpp') 'test_inline_cpp.cpp', cpp_args: cpp_unified_args, dependencies: unified_deps, + implicit_include_directories: false, include_directories: include_directories('../../include'), ), suite: 'unit', diff --git a/test/cpp/test_build.cpp b/test/cpp/test_build.cpp index 4fd2dac..2419be9 100644 --- a/test/cpp/test_build.cpp +++ b/test/cpp/test_build.cpp @@ -1,17 +1,13 @@ // Copyright 2020 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC -/* - Tests that C++ headers compile without any warnings. -*/ +// Tests that C++ headers compile without any warnings -#define PUGL_DISABLE_DEPRECATED - -#include "pugl/cairo.hpp" // IWYU pragma: keep -#include "pugl/gl.hpp" // IWYU pragma: keep -#include "pugl/pugl.h" // IWYU pragma: keep -#include "pugl/pugl.hpp" // IWYU pragma: keep -#include "pugl/stub.hpp" // IWYU pragma: keep +#include <pugl/cairo.hpp> // IWYU pragma: keep +#include <pugl/gl.hpp> // IWYU pragma: keep +#include <pugl/pugl.h> // IWYU pragma: keep +#include <pugl/pugl.hpp> // IWYU pragma: keep +#include <pugl/stub.hpp> // IWYU pragma: keep int main() diff --git a/test/cpp/test_inline_cpp.cpp b/test/cpp/test_inline_cpp.cpp index f5694eb..4c47ffb 100644 --- a/test/cpp/test_inline_cpp.cpp +++ b/test/cpp/test_inline_cpp.cpp @@ -23,34 +23,34 @@ # pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" #endif -#include "../src/common.c" // IWYU pragma: keep -#include "../src/internal.c" // IWYU pragma: keep +#include "../../src/common.c" // IWYU pragma: keep +#include "../../src/internal.c" // IWYU pragma: keep #if defined(_WIN32) -# include "../src/win.c" // IWYU pragma: keep -# include "../src/win.h" // IWYU pragma: keep -# include "../src/win_stub.c" // IWYU pragma: keep +# include "../../src/win.c" // IWYU pragma: keep +# include "../../src/win.h" // IWYU pragma: keep +# include "../../src/win_stub.c" // IWYU pragma: keep # if defined(WITH_CAIRO) -# include "../src/win_cairo.c" // IWYU pragma: keep +# include "../../src/win_cairo.c" // IWYU pragma: keep # endif # if defined(WITH_OPENGL) -# include "../src/win_gl.c" // IWYU pragma: keep +# include "../../src/win_gl.c" // IWYU pragma: keep # endif # if defined(WITH_VULKAN) -# include "../src/win_vulkan.c" // IWYU pragma: keep +# include "../../src/win_vulkan.c" // IWYU pragma: keep # endif #else -# include "../src/x11.c" // IWYU pragma: keep -# include "../src/x11_stub.c" // IWYU pragma: keep +# include "../../src/x11.c" // IWYU pragma: keep +# include "../../src/x11_stub.c" // IWYU pragma: keep # if defined(WITH_CAIRO) -# include "../src/x11_cairo.c" // IWYU pragma: keep +# include "../../src/x11_cairo.c" // IWYU pragma: keep # endif # if defined(WITH_OPENGL) -# include "../src/x11_gl.c" // IWYU pragma: keep +# include "../../src/x11_gl.c" // IWYU pragma: keep # endif # if defined(WITH_VULKAN) -# include "../src/x11_vulkan.c" // IWYU pragma: keep +# include "../../src/x11_vulkan.c" // IWYU pragma: keep # endif #endif diff --git a/test/cpp/test_inline_objcpp.mm b/test/cpp/test_inline_objcpp.mm index 1c9079b..b4d65c6 100644 --- a/test/cpp/test_inline_objcpp.mm +++ b/test/cpp/test_inline_objcpp.mm @@ -9,22 +9,22 @@ # pragma clang diagnostic ignored "-Wold-style-cast" #endif -#include "../src/common.c" // IWYU pragma: keep -#include "../src/internal.c" // IWYU pragma: keep -#include "../src/mac.h" // IWYU pragma: keep -#include "../src/mac.m" // IWYU pragma: keep -#include "../src/mac_stub.m" // IWYU pragma: keep +#include "../../src/common.c" // IWYU pragma: keep +#include "../../src/internal.c" // IWYU pragma: keep +#include "../../src/mac.h" // IWYU pragma: keep +#include "../../src/mac.m" // IWYU pragma: keep +#include "../../src/mac_stub.m" // IWYU pragma: keep #if defined(WITH_CAIRO) -# include "../src/mac_cairo.m" // IWYU pragma: keep +# include "../../src/mac_cairo.m" // IWYU pragma: keep #endif #if defined(WITH_OPENGL) -# include "../src/mac_gl.m" // IWYU pragma: keep +# include "../../src/mac_gl.m" // IWYU pragma: keep #endif #if defined(WITH_VULKAN) -# include "../src/mac_vulkan.m" // IWYU pragma: keep +# include "../../src/mac_vulkan.m" // IWYU pragma: keep #endif #if defined(__clang__) |