diff options
Diffstat (limited to 'project2/ice/unittests/testClient.cpp')
-rw-r--r-- | project2/ice/unittests/testClient.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/project2/ice/unittests/testClient.cpp b/project2/ice/unittests/testClient.cpp index 97acd0b..55663a0 100644 --- a/project2/ice/unittests/testClient.cpp +++ b/project2/ice/unittests/testClient.cpp @@ -13,7 +13,7 @@ #include <scopeObject.h> #include <unittest.h> #include <unittestComplex.h> -#include <appInstance.h> +#include <testAppInstance.h> #define XSTR(s) STR(s) #define STR(s) #s @@ -103,7 +103,7 @@ class DummyComplex : public UnitTestComplex::ComplexInterface { static void -commonTests() +commonTests(ExecContext * ec) { BOOST_TEST_CHECKPOINT("Verify loaded"); BOOST_REQUIRE(ElementLoader::getFor("UnitTest-SimpleInterface-SomeTask")); @@ -132,7 +132,7 @@ commonTests() boost::intrusive_ptr<TestScriptHost> sr = new TestScriptHost(r); BOOST_REQUIRE_EQUAL(dummy->execCount, 0); BOOST_REQUIRE_EQUAL(dummyComplex->execCount, 0); - sr->process(NULL); + sr->process(ec); BOOST_REQUIRE_EQUAL(dummy->execCount, 4); BOOST_REQUIRE_EQUAL(dummyComplex->execCount, 1); BOOST_REQUIRE_EQUAL(sr->GetPresenterData(), iceroot / "expected" / "clientPresenter.log"); @@ -152,9 +152,9 @@ unloadTests() BOOST_REQUIRE_THROW(ElementLoader::getFor("UnitTestComplex-ComplexInterface-ComplexRow"), NotSupported); } -void test_client_run(const boost::filesystem::path & tmpdir); +void test_client_run(ExecContext *, const boost::filesystem::path & tmpdir); -BOOST_FIXTURE_TEST_SUITE( Core, AppInstance ); +BOOST_FIXTURE_TEST_SUITE( Core, TestAppInstance ); BOOST_AUTO_TEST_CASE( test_client ) { @@ -162,14 +162,14 @@ BOOST_AUTO_TEST_CASE( test_client ) BOOST_TEST_CHECKPOINT("Clean up"); boost::filesystem::remove_all(tmpdir); - test_client_run(tmpdir); - test_client_run(tmpdir); + test_client_run(this, tmpdir); + test_client_run(this, tmpdir); boost::filesystem::remove_all(tmpdir); } BOOST_AUTO_TEST_SUITE_END(); -void test_client_run(const boost::filesystem::path & tmpdir) +void test_client_run(ExecContext * ec, const boost::filesystem::path & tmpdir) { BOOST_TEST_CHECKPOINT("Configure, compile, link, load"); TestOptionsSource::LoadTestOptions({ @@ -186,7 +186,7 @@ void test_client_run(const boost::filesystem::path & tmpdir) BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittestTypes.client.so")); BOOST_REQUIRE(!boost::filesystem::exists(tmpdir / "unittestComplex.so")); BOOST_REQUIRE(boost::filesystem::exists(tmpdir / "unittestComplex.client.so")); - commonTests(); + commonTests(ec); TestOptionsSource::LoadTestOptions({ }); unloadTests(); |