From e04b96abc912184031dc93e8302069a0cae2b1a8 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 23 Nov 2014 00:39:04 +0000 Subject: Renamed things to avoid conflicts of names --- project2/ice/Jamfile.jam | 2 +- project2/ice/tests/Jamfile.jam | 25 -------------------- project2/ice/tests/test.ice | 9 -------- project2/ice/tests/testClient.cpp | 34 ---------------------------- project2/ice/unittests/Jamfile.jam | 25 ++++++++++++++++++++ project2/ice/unittests/testClientCompile.cpp | 34 ++++++++++++++++++++++++++++ project2/ice/unittests/unittest.ice | 9 ++++++++ 7 files changed, 69 insertions(+), 69 deletions(-) delete mode 100644 project2/ice/tests/Jamfile.jam delete mode 100644 project2/ice/tests/test.ice delete mode 100644 project2/ice/tests/testClient.cpp create mode 100644 project2/ice/unittests/Jamfile.jam create mode 100644 project2/ice/unittests/testClientCompile.cpp create mode 100644 project2/ice/unittests/unittest.ice diff --git a/project2/ice/Jamfile.jam b/project2/ice/Jamfile.jam index 67e9eab..811b5d9 100644 --- a/project2/ice/Jamfile.jam +++ b/project2/ice/Jamfile.jam @@ -10,7 +10,7 @@ lib IceUtil ; lib pthread ; lib boost_filesystem ; -build-project tests ; +build-project unittests ; cpp-pch pch : pch.hpp : ../../libmisc diff --git a/project2/ice/tests/Jamfile.jam b/project2/ice/tests/Jamfile.jam deleted file mode 100644 index 976f34d..0000000 --- a/project2/ice/tests/Jamfile.jam +++ /dev/null @@ -1,25 +0,0 @@ -import testing ; - -lib test : - test.ice - : - ..//Ice - ..//IceUtil - ..//pthread - ; - -path-constant me : . ; - -unit-test testClient : - [ glob testClient.cpp ] - : - ROOT=\"$(me)\" - test.ice - ..//p2iceclient - ../../ut//p2ut - ../../basics//p2basics - ..//Ice - ..//IceUtil - ..//boost_filesystem - ; - diff --git a/project2/ice/tests/test.ice b/project2/ice/tests/test.ice deleted file mode 100644 index 3c18999..0000000 --- a/project2/ice/tests/test.ice +++ /dev/null @@ -1,9 +0,0 @@ -module test { - interface a - { - ["project2:task"] - void someTask(); - - }; -}; - diff --git a/project2/ice/tests/testClient.cpp b/project2/ice/tests/testClient.cpp deleted file mode 100644 index 7cd960f..0000000 --- a/project2/ice/tests/testClient.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#define BOOST_TEST_MODULE Client -#include -#include -#include "iceClient.h" -#include - -#define XSTR(s) STR(s) -#define STR(s) #s -const auto self = boost::filesystem::canonical("/proc/self/exe"); -const boost::filesystem::path iceroot(XSTR(ROOT)); - -BOOST_AUTO_TEST_CASE( compile_client_full ) -{ - const std::string tmpdir = "/tmp/ut/project2.slice/full"; - boost::filesystem::remove_all(tmpdir); - - TestOptionsSource::LoadTestOptions({ - { "ice.compile.tmpdir", tmpdir }, - { "ice.client.slice", (iceroot / "test.ice").string() } - }); -} - -BOOST_AUTO_TEST_CASE( compile_client_clientOnly ) -{ - const std::string tmpdir = "/tmp/ut/project2.slice/clientOnly"; - boost::filesystem::remove_all(tmpdir); - - TestOptionsSource::LoadTestOptions({ - { "library", (self.parent_path() / "libtest.so").string() }, - { "ice.compile.tmpdir", tmpdir }, - { "ice.client.sliceclient", (iceroot / "test.ice").string() } - }); -} - diff --git a/project2/ice/unittests/Jamfile.jam b/project2/ice/unittests/Jamfile.jam new file mode 100644 index 0000000..4c75205 --- /dev/null +++ b/project2/ice/unittests/Jamfile.jam @@ -0,0 +1,25 @@ +import testing ; + +lib unittest : + unittest.ice + : + ..//Ice + ..//IceUtil + ..//pthread + ; + +path-constant me : . ; + +unit-test testClientCompile : + [ glob testClientCompile.cpp ] + : + ROOT=\"$(me)\" + unittest.ice + ..//p2iceclient + ../../ut//p2ut + ../../basics//p2basics + ..//Ice + ..//IceUtil + ..//boost_filesystem + ; + diff --git a/project2/ice/unittests/testClientCompile.cpp b/project2/ice/unittests/testClientCompile.cpp new file mode 100644 index 0000000..4ae32d0 --- /dev/null +++ b/project2/ice/unittests/testClientCompile.cpp @@ -0,0 +1,34 @@ +#define BOOST_TEST_MODULE Client +#include +#include +#include "iceClient.h" +#include + +#define XSTR(s) STR(s) +#define STR(s) #s +const auto self = boost::filesystem::canonical("/proc/self/exe"); +const boost::filesystem::path iceroot(XSTR(ROOT)); + +BOOST_AUTO_TEST_CASE( compile_client_full ) +{ + const std::string tmpdir = "/tmp/ut/project2.slice/full"; + boost::filesystem::remove_all(tmpdir); + + TestOptionsSource::LoadTestOptions({ + { "ice.compile.tmpdir", tmpdir }, + { "ice.client.slice", (iceroot / "unittest.ice").string() } + }); +} + +BOOST_AUTO_TEST_CASE( compile_client_clientOnly ) +{ + const std::string tmpdir = "/tmp/ut/project2.slice/clientOnly"; + boost::filesystem::remove_all(tmpdir); + + TestOptionsSource::LoadTestOptions({ + { "library", (self.parent_path() / "libunittest.so").string() }, + { "ice.compile.tmpdir", tmpdir }, + { "ice.client.sliceclient", (iceroot / "unittest.ice").string() } + }); +} + diff --git a/project2/ice/unittests/unittest.ice b/project2/ice/unittests/unittest.ice new file mode 100644 index 0000000..3c18999 --- /dev/null +++ b/project2/ice/unittests/unittest.ice @@ -0,0 +1,9 @@ +module test { + interface a + { + ["project2:task"] + void someTask(); + + }; +}; + -- cgit v1.2.3