I am trying to understand how to use datasets with the boost.test library. I am following the documentation here http://www.boost.org/doc/libs/1_65_1/libs/test/doc/html/boost_test/tests_org... and have created my dataset as follows:
namespace bdata = boost::unit_test::data;
struct test_set {
class iterator {
int m_a;
public:
iterator()
: m_a(0){}
void operator++() {
++m_a;
}
int operator*() const {
return m_a;
}
};
using sample = int;
enum {arity = 1};
auto begin() const {
return iterator{};
}
bdata::size_t size() const {
return 5; // let's assume only 5 numbers
}
};
namespace boost { namespace unit_test { namespace data { namespace monomorphic {
template <>
struct is_dataset