From 6b9a1e92055298ca3a75603694fd5adcfae6d69d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 19 Jun 2016 14:42:09 +0100 Subject: Add start of test app using an as real world built route file --- icespider/compile/icespider.jam | 15 +++++++++++++++ icespider/core/Jamfile.jam | 2 ++ icespider/unittests/Jamfile.jam | 34 +++++++++++++++++++++++++++++++++- icespider/unittests/testApp.cpp | 11 +++++++++++ 4 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 icespider/compile/icespider.jam create mode 100644 icespider/unittests/testApp.cpp diff --git a/icespider/compile/icespider.jam b/icespider/compile/icespider.jam new file mode 100644 index 0000000..d1bf8d9 --- /dev/null +++ b/icespider/compile/icespider.jam @@ -0,0 +1,15 @@ +import type : register ; +import generators : register-standard ; +import type ; + +type.register JSON : json ; + +generators.register-standard icespider.routes2cpp : JSON : CPP ; + +actions icespider.routes2cpp bind ICESPIDER +{ + icespider -I"$(INCLUDES)" $(2) $(1) +} + +IMPORT $(__name__) : icespider.routes2cpp : : icespider.routes2cpp ; + diff --git a/icespider/core/Jamfile.jam b/icespider/core/Jamfile.jam index 45bc30a..d00669f 100644 --- a/icespider/core/Jamfile.jam +++ b/icespider/core/Jamfile.jam @@ -6,4 +6,6 @@ lib icespider-core : ../common adhocutil ../common + : : + . ; diff --git a/icespider/unittests/Jamfile.jam b/icespider/unittests/Jamfile.jam index 92a3434..9388f37 100644 --- a/icespider/unittests/Jamfile.jam +++ b/icespider/unittests/Jamfile.jam @@ -1,4 +1,20 @@ import testing ; +import type : register ; +import generators : register-standard ; +import type ; +import feature : feature ; +import toolset : flags ; + +type.register JSON : json ; + +generators.register-standard $(__name__).routes2cpp : JSON : CPP ; +feature icespider : : free dependency ; +flags routes2cpp ICESPIDER ; + +actions routes2cpp bind ICESPIDER +{ + "$(ICESPIDER)" -I"$(INCLUDES)" $(2) $(1) +} lib adhocutil : : : : /usr/include/adhocutil ; lib boost_utf : : boost_unit_test_framework ; @@ -19,7 +35,6 @@ alias testCommon : : run testCompile.cpp : : - test-api.ice testRoutes.json : BOOST_TEST_DYN_LINK @@ -34,6 +49,23 @@ run : testCompile : ; +run + testApp.cpp + testRoutes.json + : : : + BOOST_TEST_DYN_LINK + ../compile//icespider + testCommon + test-api + adhocutil + ../common//icespider-common + ../core//icespider-core + ../common//icespider-common + test-api + ../compile + : testApp ; + + lib test-api : test-api.ice : diff --git a/icespider/unittests/testApp.cpp b/icespider/unittests/testApp.cpp new file mode 100644 index 0000000..01249b7 --- /dev/null +++ b/icespider/unittests/testApp.cpp @@ -0,0 +1,11 @@ +#define BOOST_TEST_MODULE TestApp +#include + +#include +#include + +BOOST_AUTO_TEST_CASE( testLoadConfiguration ) +{ + BOOST_REQUIRE_EQUAL(4, AdHoc::PluginManager::getDefault()->getAll().size()); +} + -- cgit v1.2.3