summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/meson.build1
-rw-r--r--test/public-api.cpp25
2 files changed, 26 insertions, 0 deletions
diff --git a/test/meson.build b/test/meson.build
index 73eb44d0..2c3e7654 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -25,6 +25,7 @@ subdir('v4l2_videodevice')
public_tests = [
['geometry', 'geometry.cpp'],
+ ['public-api', 'public-api.cpp'],
['signal', 'signal.cpp'],
['span', 'span.cpp'],
]
diff --git a/test/public-api.cpp b/test/public-api.cpp
new file mode 100644
index 00000000..a1cebcf9
--- /dev/null
+++ b/test/public-api.cpp
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (C) 2021, Google Inc.
+ *
+ * public-api.cpp - Public API validation
+ */
+
+#include <libcamera/libcamera.h>
+
+#include "test.h"
+
+class PublicAPITest : public Test
+{
+ int run()
+ {
+#ifdef LIBCAMERA_BASE_PRIVATE
+#error "Public interfaces should not be exposed to LIBCAMERA_BASE_PRIVATE"
+ return TestFail;
+#else
+ return TestPass;
+#endif
+ }
+};
+
+TEST_REGISTER(PublicAPITest)