Skip to content

Commit

Permalink
add unit test that save mesh bp misc examples to yaml (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrush committed Feb 27, 2020
1 parent c466b6f commit 96f8e53
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/tests/blueprint/t_blueprint_mesh_examples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,32 @@ TEST(conduit_blueprint_mesh_examples, 2d_braid_zero_z_check)
}
}

//-----------------------------------------------------------------------------
TEST(conduit_blueprint_mesh_examples, mesh_misc)
{
// for each "misc" mesh example, generate a small 2d mesh and
// save to yaml
std::vector<std::string> misc_type_strings;
misc_type_strings.push_back("matsets");
misc_type_strings.push_back("specsets");
misc_type_strings.push_back("adjsets");
misc_type_strings.push_back("nestsets");

Node mesh;
int npts_x = 5;
int npts_y = 5;

for(size_t i = 0; i < misc_type_strings.size(); i++)
{
mesh.reset();
blueprint::mesh::examples::misc(misc_type_strings[i],
npts_x,
npts_y,
1,
mesh);
mesh.save("misc_example_" + misc_type_strings[i] + ".yaml");
}
}

//-----------------------------------------------------------------------------
TEST(conduit_blueprint_mesh_examples, check_gen_index_state_prop)
Expand Down

0 comments on commit 96f8e53

Please sign in to comment.