11#include < wmtk/Mesh.hpp>
22#include < wmtk/TetMesh.hpp>
33#include < wmtk/TriMesh.hpp>
4+ #include < wmtk/io/Cache.hpp>
45#include < wmtk/io/HDF5Writer.hpp>
56#include < wmtk/io/MeshReader.hpp>
67#include < wmtk/io/ParaviewWriter.hpp>
7- #include < wmtk/io/Cache.hpp>
88#include < wmtk/utils/mesh_utils.hpp>
99
1010#include < wmtk/operations/OperationFactory.hpp>
@@ -156,14 +156,14 @@ TEST_CASE("attribute_after_split", "[io]")
156156 m.serialize (writer);
157157}
158158
159- TEST_CASE (" cache_init" , " [cache]" )
159+ TEST_CASE (" cache_init" , " [cache][io] " )
160160{
161161 const fs::path dir = std::filesystem::current_path ();
162162 const std::string prefix = " wmtk_cache" ;
163163
164164 fs::path cache_dir;
165165 {
166- utils ::Cache cache (prefix, dir);
166+ io ::Cache cache (prefix, dir);
167167 cache_dir = cache.get_cache_path ();
168168
169169 CHECK (fs::exists (cache_dir));
@@ -174,12 +174,12 @@ TEST_CASE("cache_init", "[cache]")
174174 CHECK_FALSE (fs::exists (cache_dir));
175175}
176176
177- TEST_CASE (" cache_files" , " [cache]" )
177+ TEST_CASE (" cache_files" , " [cache][io] " )
178178{
179179 fs::path filepath;
180180 std::string file_name = " my_new_file" ;
181181 {
182- utils ::Cache cache (" wmtk_cache" , fs::current_path ());
182+ io ::Cache cache (" wmtk_cache" , fs::current_path ());
183183
184184 filepath = cache.create_unique_file (file_name, " .txt" );
185185
@@ -194,9 +194,9 @@ TEST_CASE("cache_files", "[cache]")
194194 CHECK_FALSE (fs::exists (filepath));
195195}
196196
197- TEST_CASE (" cache_read_write_mesh" , " [cache]" )
197+ TEST_CASE (" cache_read_write_mesh" , " [cache][io] " )
198198{
199- utils ::Cache cache (" wmtk_cache" , fs::current_path ());
199+ io ::Cache cache (" wmtk_cache" , fs::current_path ());
200200 TriMesh mesh = tests::single_triangle ();
201201
202202 const std::string name = " cached_mesh" ;
@@ -208,17 +208,17 @@ TEST_CASE("cache_read_write_mesh", "[cache]")
208208 CHECK_THROWS (cache.read_mesh (" some_file_that_does_not_exist" ));
209209}
210210
211- TEST_CASE (" cache_export_import" , " [cache]" )
211+ TEST_CASE (" cache_export_import" , " [cache][io] " )
212212{
213213 const fs::path export_location =
214- utils ::Cache::create_unique_directory (" wmtk_cache_export" , fs::current_path ());
214+ io ::Cache::create_unique_directory (" wmtk_cache_export" , fs::current_path ());
215215
216216 const std::vector<std::string> file_names = {" a" , " b" , " c" };
217217
218218 // create cache
219219 fs::path first_cache_path;
220220 {
221- utils ::Cache cache (" wmtk_cache" , fs::current_path ());
221+ io ::Cache cache (" wmtk_cache" , fs::current_path ());
222222 // generate some files
223223 for (const std::string& name : file_names) {
224224 const fs::path p = cache.create_unique_file (name, " .txt" );
@@ -239,7 +239,7 @@ TEST_CASE("cache_export_import", "[cache]")
239239
240240 // create new cache
241241 {
242- utils ::Cache cache (" wmtk_cache" , fs::current_path ());
242+ io ::Cache cache (" wmtk_cache" , fs::current_path ());
243243 // import the previously exported
244244 CHECK (cache.import_cache (export_location));
245245
@@ -254,7 +254,7 @@ TEST_CASE("cache_export_import", "[cache]")
254254
255255 // try to import even though the cache contains a file
256256 {
257- utils ::Cache cache (" wmtk_cache" , fs::current_path ());
257+ io ::Cache cache (" wmtk_cache" , fs::current_path ());
258258 cache.create_unique_file (" some_file" , " " );
259259 // import should not work if the cache already contains files
260260 CHECK_FALSE (cache.import_cache (export_location));
0 commit comments