Another fix for unit test
@@ -265,6 +265,7 @@ BOOST_FIXTURE_TEST_CASE(test_add_control, Fixture)
int flag = 00;
long t, tstep;
float h1, h2;
+ int Cindex;
// run with original controls
error = EN_openH(ph);
@@ -274,7 +275,7 @@ BOOST_FIXTURE_TEST_CASE(test_add_control, Fixture)
do {
error = EN_runH(ph, &t);
BOOST_REQUIRE(error == 0);
- error = EN_getnodevalue(ph, 11, EN_HEAD, h1); // get the tank head
+ error = EN_getnodevalue(ph, 11, EN_HEAD, &h1); // get the tank head
BOOST_REQUIRE(error == 0);
error = EN_nextH(ph, &tstep);
BOOST_REQUIRE(error == 0);
@@ -284,16 +285,16 @@ BOOST_FIXTURE_TEST_CASE(test_add_control, Fixture)
BOOST_REQUIRE(error == 0);
// disable current controls
- error = ENsetcontrol(ph, 1, EN_LOWLEVEL, 0, 0, 0, 0);
+ error = EN_setcontrol(ph, 1, 0, 0, 0, 0, 0);
BOOST_REQUIRE(error == 0);
- error = ENsetcontrol(ph, 2, EN_HILEVEL, 0, 0, 0, 0);
+ error = EN_setcontrol(ph, 2, 1, 0, 0, 0, 0);
BOOST_REQUIRE(error == 0);
// add new controls
- error = ENaddcontrol(ph, Cindex, EN_LOWLEVEL, 13, 1, 11, 110);
+ error = EN_addcontrol(ph, &Cindex, 0, 13, 1, 11, 110);
BOOST_REQUIRE(error == 0);
BOOST_REQUIRE(Cindex == 3);
- error = ENaddcontrol(ph, Cindex, EN_HILEVEL, 13, 0, 11, 140);
+ error = EN_addcontrol(ph, &Cindex, 1, 13, 0, 11, 140);
BOOST_REQUIRE(error == 0);
BOOST_REQUIRE(Cindex == 4);
@@ -305,7 +306,7 @@ BOOST_FIXTURE_TEST_CASE(test_add_control, Fixture)
do {
error = EN_runH(ph, &t);
BOOST_REQUIRE(error == 0);
- error = EN_getnodevalue(ph, 11, EN_HEAD, h2); // get the tank head
+ error = EN_getnodevalue(ph, 11, EN_HEAD, &h2); // get the tank head
BOOST_REQUIRE(error == 0);
error = EN_nextH(ph, &tstep);
BOOST_REQUIRE(error == 0);
