diff --git a/CMakeLists.txt b/CMakeLists.txt index 437bcb9..500bb5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,7 @@ set(SDL_RENDER_D3D OFF CACHE BOOL "" FORCE) set(SDL_RENDER_VULKAN OFF CACHE BOOL "" FORCE) set(SDL_VULKAN OFF CACHE BOOL "" FORCE) set(SDL_WASAPI OFF CACHE BOOL "" FORCE) + fetch_external_module( SDL GIT_REPOSITORY https://github.com/libsdl-org/SDL.git @@ -36,7 +37,7 @@ add_langulus_mod(LangulusModInputSDL ${LANGULUS_MOD_INPUTSDL_SOURCES}) target_link_libraries(LangulusModInputSDL PRIVATE SDL3-static) if(LANGULUS_TESTING) - enable_testing() + enable_testing() add_subdirectory(test) endif() diff --git a/test/Main.cpp b/test/Main.cpp index b88ce16..b5b23b9 100644 --- a/test/Main.cpp +++ b/test/Main.cpp @@ -5,14 +5,6 @@ /// /// SPDX-License-Identifier: GPL-3.0-or-later /// -#include "Main.hpp" +#include -#define CATCH_CONFIG_RUNNER -#include - -LANGULUS_RTTI_BOUNDARY(RTTI::MainBoundary) - -int main(int argc, char* argv[]) { - Catch::Session session; - return session.run(argc, argv); -} +LANGULUS_RTTI_BOUNDARY(RTTI::MainBoundary) \ No newline at end of file diff --git a/test/Main.hpp b/test/Main.hpp deleted file mode 100644 index 68f5e9f..0000000 --- a/test/Main.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/// -/// Langulus::Module::InputSDL -/// Copyright (c) 2024 Dimo Markov -/// Part of the Langulus framework, see https://langulus.com -/// -/// SPDX-License-Identifier: GPL-3.0-or-later -/// -#pragma once -#include - -using namespace Langulus; - -//#define LANGULUS_STD_BENCHMARK - -//#ifdef LANGULUS_STD_BENCHMARK -#define CATCH_CONFIG_ENABLE_BENCHMARKING -//#endif diff --git a/test/TestInput.cpp b/test/TestInput.cpp index 3bb94a0..143fca7 100644 --- a/test/TestInput.cpp +++ b/test/TestInput.cpp @@ -5,17 +5,10 @@ /// /// SPDX-License-Identifier: GPL-3.0-or-later /// -#include "Main.hpp" #include -#include +#include -/// See https://github.com/catchorg/Catch2/blob/devel/docs/tostring.md -CATCH_TRANSLATE_EXCEPTION(::Langulus::Exception const& ex) { - const Text serialized {ex}; - return ::std::string {Token {serialized}}; -} - SCENARIO("Input handler creation", "[input]") { static Allocator::State memoryState;