diff options
-rw-r--r-- | icespider/compile/icespider.jam | 15 | ||||
-rw-r--r-- | icespider/core/Jamfile.jam | 2 | ||||
-rw-r--r-- | icespider/unittests/Jamfile.jam | 34 | ||||
-rw-r--r-- | icespider/unittests/testApp.cpp | 11 |
4 files changed, 61 insertions, 1 deletions
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 : <library>../common <library>adhocutil <implicit-dependency>../common + : : + <include>. ; 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 <icespider> ; + +actions routes2cpp bind ICESPIDER +{ + "$(ICESPIDER)" -I"$(INCLUDES)" $(2) $(1) +} lib adhocutil : : : : <include>/usr/include/adhocutil ; lib boost_utf : : <name>boost_unit_test_framework ; @@ -19,7 +35,6 @@ alias testCommon : : run testCompile.cpp : : - test-api.ice testRoutes.json : <define>BOOST_TEST_DYN_LINK @@ -34,6 +49,23 @@ run : testCompile : ; +run + testApp.cpp + testRoutes.json + : : : + <define>BOOST_TEST_DYN_LINK + <icespider>../compile//icespider + <library>testCommon + <library>test-api + <library>adhocutil + <library>../common//icespider-common + <library>../core//icespider-core + <implicit-dependency>../common//icespider-common + <implicit-dependency>test-api + <dependency>../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 <boost/test/unit_test.hpp> + +#include <plugins.h> +#include <irouteHandler.h> + +BOOST_AUTO_TEST_CASE( testLoadConfiguration ) +{ + BOOST_REQUIRE_EQUAL(4, AdHoc::PluginManager::getDefault()->getAll<IceSpider::IRouteHandler>().size()); +} + |