~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to unittests/plugin/client_test.cc

  • Committer: Brian Aker
  • Date: 2011-01-12 06:45:23 UTC
  • mto: (2073.1.4 catalogs)
  • mto: This revision was merged to the branch mainline in revision 2080.
  • Revision ID: brian@tangent.org-20110112064523-rqhptaqbph22qmj1
RemoveĀ customĀ error.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include <config.h>
 
21
#include "config.h"
22
22
 
23
23
#include <drizzled/plugin/client.h>
24
24
#include <drizzled/type/time.h>
46
46
TEST_F(ClientTest, store_drizzle_time_datetime)
47
47
{
48
48
  //TODO: is the sign intentionally ignored in the case of a datetime?
49
 
  type::Time dt(2010, 4, 5, 23, 45, 3, 777, type::DRIZZLE_TIMESTAMP_DATETIME);
 
49
  type::Time dt= { 2010, 4, 5, 23, 45, 3, 777, true, DRIZZLE_TIMESTAMP_DATETIME};
50
50
  char expected[]= "2010-04-05 23:45:03.000777";
51
51
 
52
52
  client.store(&dt);
57
57
TEST_F(ClientTest, store_drizzle_time_date)
58
58
{
59
59
  //TODO: is the sign intentionally ignored in the case of a date?
60
 
  type::Time dt(2010, 4, 5, 0, 0, 0, 0, type::DRIZZLE_TIMESTAMP_DATE);
 
60
  type::Time dt= { 2010, 4, 5, 0, 0, 0, 0, true, DRIZZLE_TIMESTAMP_DATE};
61
61
  char expected[]= "2010-04-05";
62
62
  
63
63
  client.store(&dt);
67
67
 
68
68
TEST_F(ClientTest, store_drizzle_time_time)
69
69
{
70
 
  type::Time dt(23, 45, 3, 777, true);
 
70
  type::Time dt= { 2010, 4, 5, 23, 45, 3, 777, true, DRIZZLE_TIMESTAMP_TIME};
71
71
  char expected[]= "-23:45:03.000777";
72
72
  
73
73
  client.store(&dt);