MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / test_io

Function test_io

tests/mesh/test-regular-grid.cpp:441–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439}
440
441void test_io( const geode::RegularGrid3D& grid, std::string_view filename )
442{
443 geode::save_regular_grid( grid, filename );
444 const auto reload = geode::load_regular_grid< 3 >( filename );
445 geode::OpenGeodeMeshException::test(
446 grid.nb_cells() == reload->nb_cells(), "Wrong reload nb_cells()" );
447 geode::OpenGeodeMeshException::test(
448 grid.nb_cells_in_direction( 0 ) == reload->nb_cells_in_direction( 0 ),
449 "Wrong reload nb_cells_in_direction(0)" );
450 geode::OpenGeodeMeshException::test(
451 grid.nb_cells_in_direction( 1 ) == reload->nb_cells_in_direction( 1 ),
452 "Wrong reload nb_cells_in_direction(1)" );
453 geode::OpenGeodeMeshException::test(
454 grid.nb_cells_in_direction( 2 ) == reload->nb_cells_in_direction( 2 ),
455 "Wrong reload nb_cells_in_direction(2)" );
456}
457
458void test_adjacencies2D()
459{

Callers 1

test_gridFunction · 0.70

Calls 4

save_regular_gridFunction · 0.85
testFunction · 0.70
nb_cellsMethod · 0.45
nb_cells_in_directionMethod · 0.45

Tested by

no test coverage detected