Work in progress

code cleanup, addressed issue raised in review, and implemented EN_adddemand()
This commit is contained in:
Michael Tryby
2019-04-23 17:52:11 -04:00
parent 900813367e
commit cf97cf8c9c
6 changed files with 108 additions and 39 deletions

View File

@@ -82,5 +82,19 @@ BOOST_AUTO_TEST_CASE(test_categories_reopen, * boost::unit_test::depends_on("tes
BOOST_REQUIRE(error == 0);
}
BOOST_FIXTURE_TEST_CASE(test_adddemand, FixtureSingleNode)
{
int demand_index;
error = EN_adddemand(ph, node_qhut, 100.0, "PrimaryPattern", "PrimaryDemand", &demand_index);
BOOST_CHECK(error != 0);
error = EN_addpattern(ph, (char *)"PrimaryPattern");
BOOST_REQUIRE(error == 0);
error = EN_adddemand(ph, node_qhut, 100.0, "PrimaryPattern", "PrimaryDemand", &demand_index);
BOOST_CHECK(error == 0);
}
BOOST_AUTO_TEST_SUITE_END()