summaryrefslogtreecommitdiffstats
path: root/test/cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-12-10 15:53:56 -0500
committerDavid Robillard <d@drobilla.net>2022-12-10 19:04:45 -0500
commitd4dff3e6e9ea3c96d77c9b8f532dec070bdab850 (patch)
tree0e17dece1bb28597874624fe6fbf733da747f223 /test/cpp
parent66ad3770c761ab03ca1f67b15b32bebb6a4f2cac (diff)
downloadlilv-d4dff3e6e9ea3c96d77c9b8f532dec070bdab850.tar.gz
lilv-d4dff3e6e9ea3c96d77c9b8f532dec070bdab850.tar.bz2
lilv-d4dff3e6e9ea3c96d77c9b8f532dec070bdab850.zip
Resurrect C++ bindings test
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/.clang-tidy18
-rw-r--r--test/cpp/meson.build14
-rw-r--r--test/cpp/test_lilv_hpp.cpp12
3 files changed, 44 insertions, 0 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/cpp/test_lilv_hpp.cpp b/test/cpp/test_lilv_hpp.cpp
new file mode 100644
index 0000000..57cbda1
--- /dev/null
+++ b/test/cpp/test_lilv_hpp.cpp
@@ -0,0 +1,12 @@
+// Copyright 2017-2019 David Robillard <d@drobilla.net>
+// SPDX-License-Identifier: ISC
+
+#include "lilv/lilvmm.hpp"
+
+int
+main()
+{
+ Lilv::World world{};
+
+ return 0;
+}