aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt24
-rw-r--r--tests/example.t.cpp16
2 files changed, 40 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 00000000..492587e8
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,24 @@
+add_executable(OpenAL_Tests)
+
+include(FetchContent)
+FetchContent_Declare(
+ googletest
+ GIT_REPOSITORY https://github.com/google/googletest.git
+ GIT_TAG main
+)
+# For Windows: Prevent overriding the parent project's compiler/linker settings
+set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+FetchContent_MakeAvailable(googletest)
+
+target_link_libraries(OpenAL_Tests PRIVATE
+ OpenAL
+ GTest::gtest_main
+)
+
+target_sources(OpenAL_Tests PRIVATE
+example.t.cpp
+)
+
+# This needs to come last
+include(GoogleTest)
+gtest_discover_tests(OpenAL_Tests)
diff --git a/tests/example.t.cpp b/tests/example.t.cpp
new file mode 100644
index 00000000..30341e8b
--- /dev/null
+++ b/tests/example.t.cpp
@@ -0,0 +1,16 @@
+#include <gtest/gtest.h>
+#include <AL/al.h>
+
+class ExampleTest : public ::testing::Test {
+};
+
+
+TEST_F(ExampleTest, Basic)
+{
+ // just making sure we compile
+ ALuint source, buffer;
+ ALfloat offset;
+ ALenum state;
+}
+
+