aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/.clang-tidy1
-rw-r--r--test/cpp/.clang-tidy1
-rw-r--r--test/cpp/test_build.cpp14
-rw-r--r--test/cpp/test_inline_cpp.cpp26
-rw-r--r--test/cpp/test_inline_objcpp.mm16
-rw-r--r--test/meson.build9
-rw-r--r--test/test_build.c14
-rw-r--r--test/test_cairo.c4
-rw-r--r--test/test_clipboard.c4
-rw-r--r--test/test_cursor.c4
-rw-r--r--test/test_gl.c4
-rw-r--r--test/test_gl_free_unrealized.c4
-rw-r--r--test/test_gl_hints.c4
-rw-r--r--test/test_local_copy_paste.c4
-rw-r--r--test/test_realize.c4
-rw-r--r--test/test_redisplay.c4
-rw-r--r--test/test_remote_copy_paste.c4
-rw-r--r--test/test_show_hide.c4
-rw-r--r--test/test_size.c4
-rw-r--r--test/test_strerror.c2
-rw-r--r--test/test_stub.c4
-rw-r--r--test/test_stub_hints.c4
-rw-r--r--test/test_timer.c4
-rw-r--r--test/test_update.c4
-rw-r--r--test/test_view.c4
-rw-r--r--test/test_vulkan.c4
-rw-r--r--test/test_world.c2
27 files changed, 72 insertions, 85 deletions
diff --git a/test/.clang-tidy b/test/.clang-tidy
index 456eb2e..4dbdc80 100644
--- a/test/.clang-tidy
+++ b/test/.clang-tidy
@@ -3,7 +3,6 @@
Checks: >
-bugprone-multi-level-implicit-pointer-conversion,
- -bugprone-suspicious-include,
-cert-err33-c,
-cert-err34-c,
-clang-analyzer-optin.core.EnumCastOutOfRange,
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/test_build.cpp b/test/cpp/test_build.cpp
index 2f24c5f..2419be9 100644
--- a/test/cpp/test_build.cpp
+++ b/test/cpp/test_build.cpp
@@ -1,15 +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
-#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__)
diff --git a/test/meson.build b/test/meson.build
index cd95c4a..5d67d4c 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -56,10 +56,6 @@ if with_timers
basic_tests += ['timer']
endif
-includes = [
- '../include',
-]
-
foreach test : basic_tests
test(
test,
@@ -68,7 +64,6 @@ foreach test : basic_tests
'test_@0@.c'.format(test),
c_args: test_c_args,
dependencies: [pugl_dep, pugl_stub_dep, puglutil_dep],
- include_directories: include_directories(includes),
),
suite: 'unit',
)
@@ -82,7 +77,6 @@ foreach test : basic_exclusive_tests
'test_@0@.c'.format(test),
c_args: test_c_args,
dependencies: [pugl_dep, pugl_stub_dep, puglutil_dep],
- include_directories: include_directories(includes),
),
is_parallel: false,
suite: 'unit',
@@ -98,7 +92,6 @@ if opengl_dep.found()
'test_@0@.c'.format(test),
c_args: test_c_args,
dependencies: [pugl_dep, pugl_gl_dep, puglutil_dep],
- include_directories: include_directories(includes),
),
suite: 'unit',
)
@@ -114,7 +107,6 @@ if cairo_dep.found()
'test_@0@.c'.format(test),
c_args: test_c_args + cairo_args,
dependencies: [pugl_dep, pugl_cairo_dep, puglutil_dep],
- include_directories: include_directories(includes),
),
suite: 'unit',
)
@@ -130,7 +122,6 @@ if vulkan_dep.found()
'test_@0@.c'.format(test),
c_args: test_c_args,
dependencies: [pugl_dep, pugl_vulkan_dep, puglutil_dep],
- include_directories: include_directories(includes),
),
suite: 'unit',
)
diff --git a/test/test_build.c b/test/test_build.c
index 6365495..4f66eca 100644
--- a/test/test_build.c
+++ b/test/test_build.c
@@ -1,15 +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
-#include "pugl/cairo.h" // IWYU pragma: keep
-#include "pugl/gl.h" // IWYU pragma: keep
-#include "pugl/glu.h" // IWYU pragma: keep
-#include "pugl/pugl.h" // IWYU pragma: keep
-#include "pugl/stub.h" // IWYU pragma: keep
+#include <pugl/cairo.h> // IWYU pragma: keep
+#include <pugl/gl.h> // IWYU pragma: keep
+#include <pugl/glu.h> // IWYU pragma: keep
+#include <pugl/pugl.h> // IWYU pragma: keep
+#include <pugl/stub.h> // IWYU pragma: keep
int
main(void)
diff --git a/test/test_cairo.c b/test/test_cairo.c
index b96996e..043edce 100644
--- a/test/test_cairo.c
+++ b/test/test_cairo.c
@@ -7,8 +7,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/cairo.h"
-#include "pugl/pugl.h"
+#include <pugl/cairo.h>
+#include <pugl/pugl.h>
#include <cairo.h>
diff --git a/test/test_clipboard.c b/test/test_clipboard.c
index debe8e3..054f71d 100644
--- a/test/test_clipboard.c
+++ b/test/test_clipboard.c
@@ -9,8 +9,8 @@
#include "test_utils.h"
-#include "pugl/pugl.h"
-#include "pugl/stub.h"
+#include <pugl/pugl.h>
+#include <pugl/stub.h>
#include <assert.h>
#include <stdbool.h>
diff --git a/test/test_cursor.c b/test/test_cursor.c
index 01b3301..f3a9e5f 100644
--- a/test/test_cursor.c
+++ b/test/test_cursor.c
@@ -7,8 +7,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/pugl.h"
-#include "pugl/stub.h"
+#include <pugl/pugl.h>
+#include <pugl/stub.h>
#include <assert.h>
#include <stdbool.h>
diff --git a/test/test_gl.c b/test/test_gl.c
index 2747eef..ce85fa5 100644
--- a/test/test_gl.c
+++ b/test/test_gl.c
@@ -7,8 +7,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/gl.h"
-#include "pugl/pugl.h"
+#include <pugl/gl.h>
+#include <pugl/pugl.h>
#include <assert.h>
#include <stdbool.h>
diff --git a/test/test_gl_free_unrealized.c b/test/test_gl_free_unrealized.c
index ba0d895..cdb94d6 100644
--- a/test/test_gl_free_unrealized.c
+++ b/test/test_gl_free_unrealized.c
@@ -9,8 +9,8 @@
#undef NDEBUG
-#include "pugl/gl.h"
-#include "pugl/pugl.h"
+#include <pugl/gl.h>
+#include <pugl/pugl.h>
#include <assert.h>
#include <stddef.h>
diff --git a/test/test_gl_hints.c b/test/test_gl_hints.c
index 9e31548..5ca5902 100644
--- a/test/test_gl_hints.c
+++ b/test/test_gl_hints.c
@@ -7,8 +7,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/gl.h"
-#include "pugl/pugl.h"
+#include <pugl/gl.h>
+#include <pugl/pugl.h>
#include <assert.h>
diff --git a/test/test_local_copy_paste.c b/test/test_local_copy_paste.c
index bfbfc38..606b2cf 100644
--- a/test/test_local_copy_paste.c
+++ b/test/test_local_copy_paste.c
@@ -7,8 +7,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/pugl.h"
-#include "pugl/stub.h"
+#include <pugl/pugl.h>
+#include <pugl/stub.h>
#include <assert.h>
#include <stdbool.h>
diff --git a/test/test_realize.c b/test/test_realize.c
index 561e712..f15d1df 100644
--- a/test/test_realize.c
+++ b/test/test_realize.c
@@ -13,8 +13,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/pugl.h"
-#include "pugl/stub.h"
+#include <pugl/pugl.h>
+#include <pugl/stub.h>
#include <assert.h>
#include <stdbool.h>
diff --git a/test/test_redisplay.c b/test/test_redisplay.c
index 19dd812..05f7e06 100644
--- a/test/test_redisplay.c
+++ b/test/test_redisplay.c
@@ -10,8 +10,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/pugl.h"
-#include "pugl/stub.h"
+#include <pugl/pugl.h>
+#include <pugl/stub.h>
#include <assert.h>
#include <stdbool.h>
diff --git a/test/test_remote_copy_paste.c b/test/test_remote_copy_paste.c
index 3f0261b..46eefe9 100644
--- a/test/test_remote_copy_paste.c
+++ b/test/test_remote_copy_paste.c
@@ -7,8 +7,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/pugl.h"
-#include "pugl/stub.h"
+#include <pugl/pugl.h>
+#include <pugl/stub.h>
#include <assert.h>
#include <stdbool.h>
diff --git a/test/test_show_hide.c b/test/test_show_hide.c
index c784ff0..6cc2f1b 100644
--- a/test/test_show_hide.c
+++ b/test/test_show_hide.c
@@ -10,8 +10,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/pugl.h"
-#include "pugl/stub.h"
+#include <pugl/pugl.h>
+#include <pugl/stub.h>
#include <assert.h>
#include <stdbool.h>
diff --git a/test/test_size.c b/test/test_size.c
index 28bae1d..5c8eb04 100644
--- a/test/test_size.c
+++ b/test/test_size.c
@@ -7,8 +7,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/pugl.h"
-#include "pugl/stub.h"
+#include <pugl/pugl.h>
+#include <pugl/stub.h>
#include <assert.h>
#include <stdbool.h>
diff --git a/test/test_strerror.c b/test/test_strerror.c
index c120a93..4bce4eb 100644
--- a/test/test_strerror.c
+++ b/test/test_strerror.c
@@ -5,7 +5,7 @@
#undef NDEBUG
-#include "pugl/pugl.h"
+#include <pugl/pugl.h>
#include <assert.h>
#include <ctype.h>
diff --git a/test/test_stub.c b/test/test_stub.c
index 11876f6..947cbd7 100644
--- a/test/test_stub.c
+++ b/test/test_stub.c
@@ -7,8 +7,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/pugl.h"
-#include "pugl/stub.h"
+#include <pugl/pugl.h>
+#include <pugl/stub.h>
#include <assert.h>
#include <stdbool.h>
diff --git a/test/test_stub_hints.c b/test/test_stub_hints.c
index b726757..a84577d 100644
--- a/test/test_stub_hints.c
+++ b/test/test_stub_hints.c
@@ -9,8 +9,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/pugl.h"
-#include "pugl/stub.h"
+#include <pugl/pugl.h>
+#include <pugl/stub.h>
#include <assert.h>
diff --git a/test/test_timer.c b/test/test_timer.c
index 1ad0ee7..96aa50c 100644
--- a/test/test_timer.c
+++ b/test/test_timer.c
@@ -10,8 +10,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/pugl.h"
-#include "pugl/stub.h"
+#include <pugl/pugl.h>
+#include <pugl/stub.h>
#include <assert.h>
#include <math.h>
diff --git a/test/test_update.c b/test/test_update.c
index 3259438..520d4d6 100644
--- a/test/test_update.c
+++ b/test/test_update.c
@@ -10,8 +10,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/pugl.h"
-#include "pugl/stub.h"
+#include <pugl/pugl.h>
+#include <pugl/stub.h>
#include <assert.h>
#include <stdbool.h>
diff --git a/test/test_view.c b/test/test_view.c
index b2423aa..48ace6f 100644
--- a/test/test_view.c
+++ b/test/test_view.c
@@ -7,8 +7,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/pugl.h"
-#include "pugl/stub.h"
+#include <pugl/pugl.h>
+#include <pugl/stub.h>
#include <assert.h>
#include <stdbool.h>
diff --git a/test/test_vulkan.c b/test/test_vulkan.c
index ae76041..aed6684 100644
--- a/test/test_vulkan.c
+++ b/test/test_vulkan.c
@@ -7,8 +7,8 @@
#include "puglutil/test_utils.h"
-#include "pugl/pugl.h"
-#include "pugl/vulkan.h"
+#include <pugl/pugl.h>
+#include <pugl/vulkan.h>
#include <vulkan/vulkan_core.h>
diff --git a/test/test_world.c b/test/test_world.c
index 18c8ef2..9d0d145 100644
--- a/test/test_world.c
+++ b/test/test_world.c
@@ -5,7 +5,7 @@
#undef NDEBUG
-#include "pugl/pugl.h"
+#include <pugl/pugl.h>
#include <assert.h>
#include <stdint.h>