Skip to content

Commit

Permalink
CMake-based test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
gvnnz committed Mar 30, 2024
1 parent d6d7635 commit 29d056c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
20 changes: 20 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 3.25)

project(geompp LANGUAGES CXX)

add_executable(tests
src/audioBuffer.cpp
tests/audioBuffer.cpp)
target_include_directories(tests PRIVATE ${CMAKE_SOURCE_DIR})
target_compile_features(tests PRIVATE cxx_std_20)

include(cmake/CPM.cmake)

CPMAddPackage(
NAME catch2
GITHUB_REPOSITORY catchorg/Catch2
VERSION 3.5.3)

if(catch2_ADDED)
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain)
endif()
7 changes: 3 additions & 4 deletions tests/audioBuffer.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#include "../src/core/audioBuffer.h"
#include <catch2/catch.hpp>
#include <memory>
#include "src/audioBuffer.hpp"
#include <catch2/catch_test_macros.hpp>

TEST_CASE("AudioBuffer")
{
using namespace giada::m;
using namespace mcl;

static const int BUFFER_SIZE = 4096;

Expand Down

0 comments on commit 29d056c

Please sign in to comment.