diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-10 16:04:57 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-10 16:04:57 +0100 |
commit | 8dfa3d885b34f9d9cc20b47890268cedb9fb217f (patch) | |
tree | 208400aa58f825730fc6220dea76eb1780e8122f /test | |
parent | b1d66390ca5d11e48f58bb87f49b0f9da5338ca0 (diff) |
flush it
Diffstat (limited to 'test')
-rw-r--r-- | test/json.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/json.cpp b/test/json.cpp index 0cb65278..a7c9e84c 100644 --- a/test/json.cpp +++ b/test/json.cpp @@ -8,6 +8,8 @@ #include "tile.hpp" #include "chunk.hpp" #include "loader.hpp" +#include <Corrade/Containers/StringView.h> +#include <Corrade/Utility/Path.h> namespace floormat { @@ -32,21 +34,21 @@ static chunk make_test_chunk() bool floormat::test_json() // NOLINT(readability-convert-member-functions-to-static) { - const std::filesystem::path output_dir = "../test/."; + constexpr StringView output_dir = "../test/."; { auto atlas = loader.tile_atlas("metal1", {2, 2}); - json_helper::to_json(atlas, output_dir/"atlas.json"); + json_helper::to_json(atlas, Path::join(output_dir, "atlas.json")); } { Magnum::Math::Vector<2, int> v2i_1{1, 2}; Vector2i v2i_2{2, 3}; - json_helper::to_json(v2i_1, output_dir/"vec2i_1.json"); - json_helper::to_json(v2i_2, output_dir/"vec2i_2.json"); + json_helper::to_json(v2i_1, Path::join(output_dir, "vec2i_1.json")); + json_helper::to_json(v2i_2, Path::join(output_dir, "vec2i_2.json")); } { volatile float zero = 0; Magnum::Math::Vector3 vec{0.f/zero, -1.f/zero, 123.f}; - json_helper::to_json(vec, output_dir/"vec3_inf.json"); + json_helper::to_json(vec, Path::join(output_dir, "vec3_inf.json")); } return true; |