Updating unit tests

This commit is contained in:
Michael Tryby
2019-04-12 15:22:38 -04:00
parent 2404493f81
commit ce12b2297e
3 changed files with 287 additions and 222 deletions

View File

@@ -18,6 +18,35 @@
BOOST_AUTO_TEST_SUITE (test_node)
BOOST_FIXTURE_TEST_CASE(test_adddelete_node, FixtureInitClose)
{
int index;
error = EN_addnode(ph, (char *)"N2", EN_JUNCTION);
BOOST_REQUIRE(error == 0);
error = EN_addnode(ph, (char *)"N3", EN_RESERVOIR);
BOOST_REQUIRE(error == 0);
error = EN_getnodeindex(ph, "N2", &index);
BOOST_REQUIRE(error == 0);
error = EN_deletenode(ph, index, EN_UNCONDITIONAL);
BOOST_REQUIRE(error == 0);
error = EN_addnode(ph, (char *)"N4", EN_TANK);
BOOST_REQUIRE(error == 0);
error = EN_getnodeindex(ph, "N4", &index);
BOOST_REQUIRE(error == 0);
error = EN_deletenode(ph, index, EN_UNCONDITIONAL);
BOOST_REQUIRE(error == 0);
error = EN_getnodeindex(ph, "N3", &index);
BOOST_REQUIRE(error == 0);
error = EN_deletenode(ph, index, EN_UNCONDITIONAL);
BOOST_REQUIRE(error == 0);
}
BOOST_FIXTURE_TEST_CASE(test_junc_props, FixtureOpenClose)
{
int index;
@@ -297,4 +326,5 @@ BOOST_AUTO_TEST_CASE(test_reopen_comment, * boost::unit_test::depends_on("node_c
EN_deleteproject(&ph);
}
BOOST_AUTO_TEST_SUITE_END()