From 14ca0adb63a48e5bc14a4a2b84e0d108be6dfdd1 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Fri, 1 Apr 2011 18:08:51 +0200 Subject: Add SQLite-specific tests for Boost profile --- boost/sqlite/date-time/test.hxx | 59 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 boost/sqlite/date-time/test.hxx (limited to 'boost/sqlite/date-time/test.hxx') diff --git a/boost/sqlite/date-time/test.hxx b/boost/sqlite/date-time/test.hxx new file mode 100644 index 0000000..020bc7d --- /dev/null +++ b/boost/sqlite/date-time/test.hxx @@ -0,0 +1,59 @@ +// file : boost/sqlite/date-time/test.hxx +// author : Constantin Michael +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef TEST_HXX +#define TEST_HXX + +#include + +#include +#include + +#include + +#pragma db object +struct object +{ + object () + { + } + + bool + operator== (const object& x) const + { + return + id == x.id && + dates == x.dates && + times == x.times && + durations == x.durations && + u_dates == x.u_dates && + u_times == x.u_times && + s_durations == x.s_durations; + } + + #pragma db id auto + unsigned long id; + + std::vector dates; + std::vector times; + std::vector durations; + + // Dates as UNIX time. + // + #pragma db value_type("INTEGER") + std::vector u_dates; + + // Times as UNIX time. + // + #pragma db value_type("INTEGER") + std::vector u_times; + + // Durations as seconds. + // + #pragma db value_type("INTEGER") + std::vector s_durations; +}; + +#endif // TEST_HXX -- cgit v1.1