From 24d90a530d02bc088df603c32f9ce8995c54920b Mon Sep 17 00:00:00 2001 From: Lew Rossman Date: Tue, 27 Nov 2018 15:16:12 -0500 Subject: [PATCH] Replaced EN_ProjectHandle with EN_Project in unit tests --- tests/test_addrule.cpp | 2 +- tests/test_demand_categories.cpp | 2 +- tests/test_net_builder.cpp | 2 +- tests/test_reent.cpp | 2 +- tests/test_setid.cpp | 2 +- tests/test_setlinktype.cpp | 2 +- tests/test_toolkit.cpp | 9 +++++---- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/tests/test_addrule.cpp b/tests/test_addrule.cpp index 6eeea93..851d821 100644 --- a/tests/test_addrule.cpp +++ b/tests/test_addrule.cpp @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) int link113, node23, link22, pump9_before, pump9_after; float priority; - EN_ProjectHandle ph = NULL; + EN_Project ph = NULL; EN_createproject(&ph); std::string path_inp = std::string(DATA_PATH_INP); diff --git a/tests/test_demand_categories.cpp b/tests/test_demand_categories.cpp index bbfc43f..efc8d8a 100644 --- a/tests/test_demand_categories.cpp +++ b/tests/test_demand_categories.cpp @@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE(test_demand_categories) int error = 0; int Nindex, ndem; - EN_ProjectHandle ph = NULL; + EN_Project ph = NULL; error = EN_createproject(&ph); error = EN_open(ph, path_inp.c_str(), path_rpt.c_str(), path_out.c_str()); diff --git a/tests/test_net_builder.cpp b/tests/test_net_builder.cpp index f6f7bea..ee95341 100644 --- a/tests/test_net_builder.cpp +++ b/tests/test_net_builder.cpp @@ -37,7 +37,7 @@ BOOST_AUTO_TEST_CASE(test_net_builder) float h_orig, h_build, h_build_loaded; // first we load Net1.inp, run it and record the head in Tank 2 at the end of the simulation (h_orig) - EN_ProjectHandle ph = NULL; + EN_Project ph = NULL; EN_createproject(&ph); std::string path_inp = std::string(DATA_PATH_INP); diff --git a/tests/test_reent.cpp b/tests/test_reent.cpp index 4ac1d3c..99f896f 100644 --- a/tests/test_reent.cpp +++ b/tests/test_reent.cpp @@ -23,7 +23,7 @@ using namespace std; void epanet_thread(long i) { int errorcode = 0; - EN_ProjectHandle ph; + EN_Project ph; string prefix = "example_"; string suffix = ".inp"; diff --git a/tests/test_setid.cpp b/tests/test_setid.cpp index 68fe5cc..9d4bcb7 100644 --- a/tests/test_setid.cpp +++ b/tests/test_setid.cpp @@ -29,7 +29,7 @@ BOOST_AUTO_TEST_CASE(test_setid) int error = 0; int index; - EN_ProjectHandle ph = NULL; + EN_Project ph = NULL; EN_createproject(&ph); error = EN_open(ph, path_inp.c_str(), path_rpt.c_str(), ""); diff --git a/tests/test_setlinktype.cpp b/tests/test_setlinktype.cpp index 65293b0..b9efb6f 100644 --- a/tests/test_setlinktype.cpp +++ b/tests/test_setlinktype.cpp @@ -29,7 +29,7 @@ BOOST_AUTO_TEST_CASE(test_setlinktype) int p113, n31, p121, n113_1, n113_2; float q113 = 0.0f, p31 = 0.0f, diam; - EN_ProjectHandle ph = NULL; + EN_Project ph = NULL; EN_createproject(&ph); std::string path_inp = std::string(DATA_PATH_INP); diff --git a/tests/test_toolkit.cpp b/tests/test_toolkit.cpp index c09b158..618fc1c 100644 --- a/tests/test_toolkit.cpp +++ b/tests/test_toolkit.cpp @@ -36,7 +36,7 @@ BOOST_AUTO_TEST_SUITE (test_toolkit) BOOST_AUTO_TEST_CASE (test_alloc_free) { int error = 0; - EN_ProjectHandle ph = NULL; + EN_Project ph = NULL; error = EN_createproject(&ph); @@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE (test_open_close) string path_rpt(DATA_PATH_RPT); string path_out(DATA_PATH_OUT); - EN_ProjectHandle ph = NULL; + EN_Project ph = NULL; EN_createproject(&ph); int error = EN_open(ph, path_inp.c_str(), path_rpt.c_str(), path_out.c_str()); @@ -74,7 +74,8 @@ BOOST_AUTO_TEST_CASE(test_save_reopen) string path_rpt(DATA_PATH_RPT); string path_out(DATA_PATH_OUT); - EN_ProjectHandle ph_save, ph_reopen; + EN_Project ph_save; + EN_Project ph_reopen; EN_createproject(&ph_save); @@ -126,7 +127,7 @@ struct Fixture{ string path_out; int error; - EN_ProjectHandle ph; + EN_Project ph; }; BOOST_AUTO_TEST_SUITE(test_epanet_fixture)