From 74fbcf7768fc006e4ae30e8c626088691eca8385 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Fri, 6 Jul 2018 09:31:58 -0400 Subject: [PATCH] Adding test for stepping through quality simulation --- tests/test_toolkit.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/test_toolkit.cpp b/tests/test_toolkit.cpp index 4604eaa..143e59e 100644 --- a/tests/test_toolkit.cpp +++ b/tests/test_toolkit.cpp @@ -135,4 +135,30 @@ BOOST_FIXTURE_TEST_CASE(test_hyd_step, Fixture) BOOST_REQUIRE(error == 0); } +BOOST_FIXTURE_TEST_CASE(test_qual_step, Fixture) +{ + int flag = 0; + long t, tstep; + + error = EN_solveH(ph); + BOOST_REQUIRE(error == 0); + + error = EN_openQ(ph); + BOOST_REQUIRE(error == 0); + + error = EN_initQ(ph, flag); + BOOST_REQUIRE(error == 0); + + do { + error = EN_runQ(ph, &t); + BOOST_REQUIRE(error == 0); + + error = EN_nextQ(ph, &tstep); + BOOST_REQUIRE(error == 0); + } while (tstep > 0); + + error = EN_closeQ(ph); + BOOST_REQUIRE(error == 0); +} + BOOST_AUTO_TEST_SUITE_END()