~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-19 18:03:32 UTC
  • mfrom: (2088.8.12 timestamp)
  • mto: This revision was merged to the branch mainline in revision 2098.
  • Revision ID: brian@tangent.org-20110119180332-acfk5i8oofp63s40
Merge in time code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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, true, DRIZZLE_TIMESTAMP_DATETIME};
 
49
  type::Time dt(2010, 4, 5, 23, 45, 3, 777, type::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, true, DRIZZLE_TIMESTAMP_DATE};
 
60
  type::Time dt(2010, 4, 5, 0, 0, 0, 0, type::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= { 2010, 4, 5, 23, 45, 3, 777, true, DRIZZLE_TIMESTAMP_TIME};
 
70
  type::Time dt(23, 45, 3, 777, true);
71
71
  char expected[]= "-23:45:03.000777";
72
72
  
73
73
  client.store(&dt);