summaryrefslogtreecommitdiffhomepage
path: root/test/json.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/json.cpp')
-rw-r--r--test/json.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/json.cpp b/test/json.cpp
index 70d8a80c..d94489ee 100644
--- a/test/json.cpp
+++ b/test/json.cpp
@@ -35,4 +35,24 @@ void test_app::test_json() // NOLINT(readability-convert-member-functions-to-sta
}
}
+void test_app::test_json2()
+{
+ fm_assert(Path::exists(Path::join(loader.TEMP_PATH, "CMakeCache.txt")));
+ const auto output_dir = Path::join(loader.TEMP_PATH, "test/."_s);
+ auto atlas1 = loader.make_invalid_ground_atlas().atlas;
+ json_helper::to_json(atlas1, Path::join(output_dir, "atlas1.json"));
+ auto atlas2 = loader.make_invalid_wall_atlas().atlas;
+ atlas2->serialize(Path::join(output_dir, "atlas2.json"));
+}
+
+void test_app::test_json3()
+{
+ fm_assert(Path::exists(Path::join(loader.TEMP_PATH, "CMakeCache.txt")));
+ const auto output_dir = Path::join(loader.TEMP_PATH, "test/."_s);
+ auto atlas3 = loader.ground_atlas("metal1");
+ json_helper::to_json(atlas3, Path::join(output_dir, "atlas3.json"));
+ auto atlas4 = loader.wall_atlas("empty");
+ atlas4->serialize(Path::join(output_dir, "atlas4.json"));
+}
+
} // namespace floormat