diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 3 | ||||
-rw-r--r-- | test/json.cpp | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2bec4a7c..ec7078cb 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,8 +1,11 @@ set(self "${PROJECT_NAME}-test") file(GLOB sources "*.cpp" CONFIGURE_ARGS) +file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/test") + link_libraries(${PROJECT_NAME}) link_libraries(Magnum::Application Magnum::Trade) add_executable(${self} "${sources}" "../main/loader-impl.cpp") install(TARGETS ${self} RUNTIME DESTINATION bin) + diff --git a/test/json.cpp b/test/json.cpp index 51bc6f80..dfcbd23f 100644 --- a/test/json.cpp +++ b/test/json.cpp @@ -11,7 +11,7 @@ void app::test_json() // NOLINT(readability-convert-member-functions-to-static) { bool ret = true; using nlohmann::to_json; - const std::filesystem::path output_dir = "f:/dev/game/build/test/"; + const std::filesystem::path output_dir = "../test/"; { nlohmann::json j; auto atlas = loader.tile_atlas("share/game/images/metal1.tga", {2, 2}); @@ -19,7 +19,7 @@ void app::test_json() // NOLINT(readability-convert-member-functions-to-static) } { Magnum::Math::Vector<2, int> v2i_1{1, 2}; - Vector2 v2i_2{2, 3}; + Vector2i v2i_2{2, 3}; ret &= json_helper::to_json(v2i_1, output_dir/"vec2i_1.json"); ret &= json_helper::to_json(v2i_2, output_dir/"vec2i_2.json"); } |