From 69b6290aa38a4786fc24db3ca9860dcf87a1bd80 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 3 Dec 2014 23:52:52 +0000 Subject: Split test types into a separate .ice --- project2/ice/unittests/Jamfile.jam | 4 ++-- project2/ice/unittests/testClient.cpp | 1 + project2/ice/unittests/testClientCompile.cpp | 3 +++ project2/ice/unittests/testDaemon.cpp | 1 + project2/ice/unittests/testDaemonCompile.cpp | 3 +++ project2/ice/unittests/unittest.ice | 10 ++-------- project2/ice/unittests/unittestTypes.ice | 16 ++++++++++++++++ 7 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 project2/ice/unittests/unittestTypes.ice diff --git a/project2/ice/unittests/Jamfile.jam b/project2/ice/unittests/Jamfile.jam index 239f856..ee31919 100644 --- a/project2/ice/unittests/Jamfile.jam +++ b/project2/ice/unittests/Jamfile.jam @@ -1,7 +1,7 @@ import testing ; lib unittest : - unittest.ice + [ glob *.ice ] : no ..//Ice @@ -13,7 +13,7 @@ lib unittest : ; lib unittestr : - unittest.ice + [ glob *.ice ] : yes ..//Ice diff --git a/project2/ice/unittests/testClient.cpp b/project2/ice/unittests/testClient.cpp index 4040b60..dce6b2f 100644 --- a/project2/ice/unittests/testClient.cpp +++ b/project2/ice/unittests/testClient.cpp @@ -119,6 +119,7 @@ BOOST_AUTO_TEST_CASE( test_client ) { "common.datasourceRoot", iceroot.string() }, { "ice.compile.tmpdir", tmpdir }, { "ice.compile.headers", headers.string() }, + { "ice.client.slicerclient", (iceroot / "unittestTypes.ice").string() }, { "ice.client.slicerclient", (iceroot / "unittest.ice").string() } }); commonTests(); diff --git a/project2/ice/unittests/testClientCompile.cpp b/project2/ice/unittests/testClientCompile.cpp index 0d225df..8a93270 100644 --- a/project2/ice/unittests/testClientCompile.cpp +++ b/project2/ice/unittests/testClientCompile.cpp @@ -48,6 +48,7 @@ BOOST_AUTO_TEST_CASE( compile_client_full ) { "common.datasourceRoot", iceroot.string() }, { "ice.compile.tmpdir", tmpdir }, { "ice.compile.headers", headers.string() }, + { "ice.client.slice", (iceroot / "unittestTypes.ice").string() }, { "ice.client.slice", (iceroot / "unittest.ice").string() } }); commonTests(); @@ -68,6 +69,7 @@ BOOST_AUTO_TEST_CASE( compile_client_clientOnly ) { "common.datasourceRoot", iceroot.string() }, { "ice.compile.tmpdir", tmpdir }, { "ice.compile.headers", headers.string() }, + { "ice.client.sliceclient", (iceroot / "unittestTypes.ice").string() }, { "ice.client.sliceclient", (iceroot / "unittest.ice").string() } }); commonTests(); @@ -88,6 +90,7 @@ BOOST_AUTO_TEST_CASE( compile_client_slicer ) { "common.datasourceRoot", iceroot.string() }, { "ice.compile.tmpdir", tmpdir }, { "ice.compile.headers", headers.string() }, + { "ice.client.slicerclient", (iceroot / "unittestTypes.ice").string() }, { "ice.client.slicerclient", (iceroot / "unittest.ice").string() } }); commonTests(); diff --git a/project2/ice/unittests/testDaemon.cpp b/project2/ice/unittests/testDaemon.cpp index 74b95b2..2a5a5df 100644 --- a/project2/ice/unittests/testDaemon.cpp +++ b/project2/ice/unittests/testDaemon.cpp @@ -152,6 +152,7 @@ BOOST_AUTO_TEST_CASE( test_daemon ) { "ice.daemon.taskRoot", (iceroot / "tasks").string() }, { "ice.compile.tmpdir", tmpdir }, { "ice.compile.headers", headers.string() }, + { "ice.daemon.slicerdaemon", (iceroot / "unittestTypes.ice").string() }, { "ice.daemon.slicerdaemon", (iceroot / "unittest.ice").string() } }); commonTests(); diff --git a/project2/ice/unittests/testDaemonCompile.cpp b/project2/ice/unittests/testDaemonCompile.cpp index 26eb651..22fcaed 100644 --- a/project2/ice/unittests/testDaemonCompile.cpp +++ b/project2/ice/unittests/testDaemonCompile.cpp @@ -37,6 +37,7 @@ BOOST_AUTO_TEST_CASE( compile_daemon_full ) TestOptionsSource::LoadTestOptions({ { "ice.compile.tmpdir", tmpdir }, { "ice.compile.headers", headers.string() }, + { "ice.daemon.slice", (iceroot / "unittestTypes.ice").string() }, { "ice.daemon.slice", (iceroot / "unittest.ice").string() } }); commonTests(); @@ -56,6 +57,7 @@ BOOST_AUTO_TEST_CASE( compile_daemon_daemonOnly ) { "library", (bindir / "libunittest.so").string() }, { "ice.compile.tmpdir", tmpdir }, { "ice.compile.headers", headers.string() }, + { "ice.daemon.slicedaemon", (iceroot / "unittestTypes.ice").string() }, { "ice.daemon.slicedaemon", (iceroot / "unittest.ice").string() } }); commonTests(); @@ -75,6 +77,7 @@ BOOST_AUTO_TEST_CASE( compile_daemon_slicer ) { "library", (bindir / "slicer-yes" / "libunittestr.so").string() }, { "ice.compile.tmpdir", tmpdir }, { "ice.compile.headers", headers.string() }, + { "ice.daemon.slicerdaemon", (iceroot / "unittestTypes.ice").string() }, { "ice.daemon.slicerdaemon", (iceroot / "unittest.ice").string() } }); commonTests(); diff --git a/project2/ice/unittests/unittest.ice b/project2/ice/unittests/unittest.ice index f7305d3..a1328b0 100644 --- a/project2/ice/unittests/unittest.ice +++ b/project2/ice/unittests/unittest.ice @@ -1,12 +1,6 @@ -module UnitTest { - ["project2:type"] - class Simple { - int a; - string b; - }; - - sequence Simples; +#include "unittestTypes.ice" +module UnitTest { interface SimpleInterface { ["project2:rows"] diff --git a/project2/ice/unittests/unittestTypes.ice b/project2/ice/unittests/unittestTypes.ice new file mode 100644 index 0000000..c67f336 --- /dev/null +++ b/project2/ice/unittests/unittestTypes.ice @@ -0,0 +1,16 @@ +#ifndef UNITTESTTYPES +#define UNITTESTTYPES + +module UnitTest { + ["project2:type"] + class Simple { + int a; + string b; + }; + + sequence Simples; + +}; + +#endif + -- cgit v1.2.3