2010-07-21 03:34:46 +00:00
|
|
|
#define BOOST_TEST_MODULE compile_test
|
2010-07-20 00:40:37 +00:00
|
|
|
|
|
|
|
// boost.test
|
|
|
|
#include <boost/test/included/unit_test.hpp>
|
|
|
|
|
|
|
|
// mapnik
|
|
|
|
#include <mapnik/map.hpp>
|
|
|
|
#include <mapnik/svg_renderer.hpp>
|
|
|
|
|
|
|
|
// std
|
|
|
|
#include <sstream>
|
2010-07-22 04:48:11 +00:00
|
|
|
#include <iterator>
|
2010-07-20 00:40:37 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This test is meant to see if the empty
|
|
|
|
* implementation of SVG renderer compiles
|
|
|
|
* and runs when using the inherited methods.
|
|
|
|
*/
|
|
|
|
BOOST_AUTO_TEST_CASE(compile_test_case)
|
|
|
|
{
|
|
|
|
using namespace mapnik;
|
|
|
|
|
|
|
|
Map map(800, 600);
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
2010-07-21 03:34:46 +00:00
|
|
|
std::ostringstream output_stream;
|
2010-07-22 04:48:11 +00:00
|
|
|
std::ostream_iterator<char> output_stream_iterator(output_stream);
|
|
|
|
svg_renderer<std::ostream_iterator<char> > renderer(map, output_stream_iterator);
|
2010-07-21 03:34:46 +00:00
|
|
|
renderer.apply();
|
2010-07-20 00:40:37 +00:00
|
|
|
}
|
|
|
|
catch(...)
|
|
|
|
{
|
2010-07-21 03:34:46 +00:00
|
|
|
BOOST_FAIL("Empty implementation throws exception.");
|
2010-07-20 00:40:37 +00:00
|
|
|
}
|
|
|
|
}
|