~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to unittests/generator.h

moved shared generators to Temporal
added file for DateTime tests
added tests for DateTime

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
{
33
33
public:
34
34
 
 
35
  class TemporalGen
 
36
  {
 
37
  public:
 
38
    static void leap_day_in_leap_year(drizzled::Temporal *temporal);
 
39
    static void leap_day_in_non_leap_year(drizzled::Temporal *temporal);
 
40
    static void make_min_time(drizzled::Temporal *temporal);
 
41
    static void make_max_time(drizzled::Temporal *temporal);
 
42
  };
 
43
  
35
44
  class DateGen
36
45
  {
37
46
  public:
38
47
    static void make_date(drizzled::Date *date, uint32_t years, uint32_t months, uint32_t days);
39
 
    static void make_valid_date(drizzled::Date *date);
40
 
    static void leap_day_in_leap_year(drizzled::Date *date);
41
 
    static void leap_day_in_non_leap_year(drizzled::Date *date);
 
48
    static void make_valid_date(drizzled::Date *date);  
42
49
  };
43
50
  
44
51
  class TimeGen
45
52
  {
46
53
  public:
47
54
    static void make_time(drizzled::Time *time, uint32_t hours, uint32_t minutes, uint32_t seconds);
48
 
    static void make_min_time(drizzled::Time *time);
49
 
    static void make_max_time(drizzled::Time *time);
50
55
  };
51
56
  
52
57
  class DateTimeGen
53
58
  {
54
 
    public:
55
 
      static void make_datetime(drizzled::DateTime *datetime,
56
 
                                uint32_t years, uint32_t months, uint32_t days, uint32_t _hours,
57
 
                                uint32_t _minutes, uint32_t _seconds, uint32_t _useconds);
 
59
  public:
 
60
    static void make_datetime(drizzled::DateTime *datetime,
 
61
                              uint32_t years, uint32_t months, uint32_t days, uint32_t _hours,
 
62
                              uint32_t _minutes, uint32_t _seconds);
 
63
    static void make_valid_datetime(drizzled::DateTime *datetime);
58
64
  };
59
65
  
60
66
  class TimestampGen
61
67
  {
62
 
    public:
63
 
      static void make_timestamp(drizzled::Timestamp *timestamp,
64
 
                                 uint32_t years, uint32_t months, uint32_t days);
 
68
  public:
 
69
    static void make_timestamp(drizzled::Timestamp *timestamp,
 
70
                                uint32_t years, uint32_t months, uint32_t days);
65
71
  };
66
72
};
67
73