~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to unittests/nano_timestamp_test.cc

changed Generator to TemporalGenerator

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
TEST_F(NanoTimestampTest, is_valid_minOfNanoTimestampRange_shouldReturn_True)
38
38
{
39
39
  uint32_t year= 1970, month= 1, day= 1, hour= 0, minute= 0, second= 0, nanosecond= 0;
40
 
  Generator::TimestampGen::make_nano_timestamp(&nano_timestamp, year, month, day, hour, minute, second, nanosecond);
 
40
  TemporalGenerator::TimestampGen::make_nano_timestamp(&nano_timestamp, year, month, day, hour, minute, second, nanosecond);
41
41
 
42
42
  result= nano_timestamp.is_valid();
43
43
 
47
47
TEST_F(NanoTimestampTest, is_valid_maxOfNanoTimestampRange_shouldReturn_True)
48
48
{
49
49
  uint32_t year= 2038, month= 1, day= 19, hour= 3, minute= 14, second= 7, nanosecond= 0;
50
 
  Generator::TimestampGen::make_nano_timestamp(&nano_timestamp, year, month, day, hour, minute, second, nanosecond);
 
50
  TemporalGenerator::TimestampGen::make_nano_timestamp(&nano_timestamp, year, month, day, hour, minute, second, nanosecond);
51
51
 
52
52
  result= nano_timestamp.is_valid();
53
53
 
57
57
TEST_F(NanoTimestampTest, is_valid_oneMicroSecondBeforeNanoTimestampMinOfRange_shouldReturn_False)
58
58
{
59
59
  uint32_t year= 1969, month= 12, day= 31, hour= 23, minute= 59, second= 59, nanosecond= 999999999;
60
 
  Generator::TimestampGen::make_nano_timestamp(&nano_timestamp, year, month, day, hour, minute, second, nanosecond);
 
60
  TemporalGenerator::TimestampGen::make_nano_timestamp(&nano_timestamp, year, month, day, hour, minute, second, nanosecond);
61
61
 
62
62
  result= nano_timestamp.is_valid();
63
63
 
67
67
TEST_F(NanoTimestampTest, is_valid_oneMicroSecondAfterNanoTimestampMaxOfRange_shouldReturn_False)
68
68
{
69
69
  uint32_t year= 2038, month= 1, day= 19, hour= 3, minute= 14, second= 8, nanosecond= 1;
70
 
  Generator::TimestampGen::make_nano_timestamp(&nano_timestamp, year, month, day, hour, minute, second, nanosecond);
 
70
  TemporalGenerator::TimestampGen::make_nano_timestamp(&nano_timestamp, year, month, day, hour, minute, second, nanosecond);
71
71
 
72
72
  result= nano_timestamp.is_valid();
73
73
 
77
77
TEST_F(NanoTimestampTest, is_valid_InsideOfNanoTimestampRange_shouldReturn_True)
78
78
{
79
79
  uint32_t year= 1980, month= 11, day= 1, hour= 5, minute= 8, second= 5, nanosecond= 3265832;
80
 
  Generator::TimestampGen::make_nano_timestamp(&nano_timestamp, year, month, day, hour, minute, second, nanosecond);
 
80
  TemporalGenerator::TimestampGen::make_nano_timestamp(&nano_timestamp, year, month, day, hour, minute, second, nanosecond);
81
81
 
82
82
  result= nano_timestamp.is_valid();
83
83
 
88
88
{
89
89
  struct timespec filled;
90
90
  uint32_t year= 2009, month= 6, day= 3, hour= 4, minute= 59, second= 1, nanosecond= 675;
91
 
  Generator::TimestampGen::make_nano_timestamp(&nano_timestamp, year, month, day, hour, minute, second, nanosecond);
 
91
  TemporalGenerator::TimestampGen::make_nano_timestamp(&nano_timestamp, year, month, day, hour, minute, second, nanosecond);
92
92
 
93
93
  nano_timestamp.to_timespec(&filled);
94
94