~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to unittests/plugin/client_test.cc

  • Committer: Lee Bieber
  • Date: 2010-11-07 19:34:48 UTC
  • mfrom: (1910.1.2 build)
  • Revision ID: kalebral@gmail.com-20101107193448-64kdu912qej354sh
Merge Stewart - including adapting and expanding the "differences from mysql" page from the wiki.
Merge Stewart - fix bug 668143: drizzleslap with --commit runs second iteration data load in a transaction

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "config.h"
22
22
 
23
23
#include <drizzled/plugin/client.h>
24
 
#include <drizzled/type/time.h>
 
24
#include <drizzled/drizzle_time.h>
25
25
#include <gtest/gtest.h>
26
26
#include <string.h>
27
27
 
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
  DRIZZLE_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
  DRIZZLE_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
  DRIZZLE_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);