summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/cpp/.clang-tidy18
-rw-r--r--test/cpp/meson.build14
-rw-r--r--test/cpp/test_lilv_hpp.cpp (renamed from test/lilv_cxx_test.cpp)2
-rw-r--r--test/meson.build8
4 files changed, 41 insertions, 1 deletions
diff --git a/test/cpp/.clang-tidy b/test/cpp/.clang-tidy
new file mode 100644
index 0000000..8e5e749
--- /dev/null
+++ b/test/cpp/.clang-tidy
@@ -0,0 +1,18 @@
+# Copyright 2020-2022 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: 0BSD OR ISC
+
+Checks: >
+ -cert-dcl50-cpp,
+ -cppcoreguidelines-macro-usage,
+ -cppcoreguidelines-pro-bounds-array-to-pointer-decay,
+ -fuchsia-overloaded-operator,
+ -google-explicit-constructor,
+ -google-readability-todo,
+ -hicpp-explicit-conversions,
+ -hicpp-no-array-decay,
+ -misc-non-private-member-variables-in-classes,
+ -modernize-return-braced-init-list,
+ -modernize-use-trailing-return-type,
+ -readability-implicit-bool-conversion,
+HeaderFilterRegex: '.*/lilvmm\.hpp'
+InheritParentConfig: true
diff --git a/test/cpp/meson.build b/test/cpp/meson.build
new file mode 100644
index 0000000..6451b0c
--- /dev/null
+++ b/test/cpp/meson.build
@@ -0,0 +1,14 @@
+# Copyright 2020-2022 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: 0BSD OR ISC
+
+test(
+ 'lilv_hpp',
+ executable(
+ 'test_lilv_hpp',
+ files('test_lilv_hpp.cpp'),
+ c_args: test_args + c_suppressions,
+ dependencies: [lv2_dep, lilv_static_dep],
+ include_directories: include_directories('../../src'),
+ ),
+ suite: 'unit',
+)
diff --git a/test/lilv_cxx_test.cpp b/test/cpp/test_lilv_hpp.cpp
index 1fc674e..57cbda1 100644
--- a/test/lilv_cxx_test.cpp
+++ b/test/cpp/test_lilv_hpp.cpp
@@ -6,7 +6,7 @@
int
main()
{
- Lilv::World world;
+ Lilv::World world{};
return 0;
}
diff --git a/test/meson.build b/test/meson.build
index 665b08f..e974951 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -55,6 +55,14 @@ subdir('new_version.lv2')
subdir('old_version.lv2')
subdir('test_plugin.lv2')
+################
+# C++ Bindings #
+################
+
+if not get_option('bindings_cpp').disabled()
+ subdir('cpp')
+endif
+
##############
# Unit Tests #
##############