Skip to content

Commit

Permalink
Now using common test library
Browse files Browse the repository at this point in the history
  • Loading branch information
Epixu committed Feb 17, 2025
1 parent fa8ccab commit 4ef424a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 36 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()

Expand Down
12 changes: 2 additions & 10 deletions test/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@
///
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#include "Main.hpp"
#include <Langulus/MetaOf.hpp>

#define CATCH_CONFIG_RUNNER
#include <catch2/catch.hpp>

LANGULUS_RTTI_BOUNDARY(RTTI::MainBoundary)

int main(int argc, char* argv[]) {
Catch::Session session;
return session.run(argc, argv);
}
LANGULUS_RTTI_BOUNDARY(RTTI::MainBoundary)
17 changes: 0 additions & 17 deletions test/Main.hpp

This file was deleted.

9 changes: 1 addition & 8 deletions test/TestInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,10 @@
///
/// SPDX-License-Identifier: GPL-3.0-or-later
///
#include "Main.hpp"
#include <Langulus/Input.hpp>
#include <catch2/catch.hpp>
#include <Langulus/Testing.hpp>


/// 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;

Expand Down

0 comments on commit 4ef424a

Please sign in to comment.