Example shows simple Gnuplot visualization.
#include "shared-tests/fixture.hh"
#include <iostream>
using namespace roboptim;
using namespace roboptim::visualization;
BOOST_FIXTURE_TEST_SUITE (core, TestSuiteConfiguration)
BOOST_AUTO_TEST_CASE (visualization_gnuplot_simple)
{
boost::shared_ptr<boost::test_tools::output_test_stream>
output = retrievePattern ("visualization-gnuplot-simple");
using namespace roboptim::visualization::gnuplot;
Gnuplot gnuplot = Gnuplot::make_gnuplot ();
(*output)
<< (gnuplot
<< set ("term", "x11 enhanced persist")
<<
comment (
"Hello, world!\nThis is a three-line comment!\nAmazing!")
);
gnuplot.clear ();
(*output) << gnuplot;
std::cout << output->str () << std::endl;
BOOST_CHECK (output->match_pattern ());
}
BOOST_AUTO_TEST_SUITE_END ()