~ubuntu-branches/ubuntu/wily/libspiff/wily

« back to all changes in this revision

Viewing changes to test/DateTimeSuite.h

  • Committer: Bazaar Package Importer
  • Author(s): Adeodato Simó
  • Date: 2007-10-11 14:44:38 UTC
  • Revision ID: james.westby@ubuntu.com-20071011144438-zpl4gtvl3bf2ocnx
Tags: upstream-0.8.2
Import upstream version 0.8.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * libSpiff - XSPF playlist handling library
 
3
 *
 
4
 * Copyright (C) 2006 Sebastian Pipping
 
5
 *
 
6
 * This library is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the GNU Lesser General Public
 
8
 * License as published by the Free Software Foundation; either
 
9
 * version 2.1 of the License, or (at your option) any later version.
 
10
 *
 
11
 * This library is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
 * Lesser General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU Lesser General Public
 
17
 * License along with this library; if not, write to the Free Software
 
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 *
 
20
 * Sebastian Pipping, webmaster@hartwork.org
 
21
 */
 
22
 
 
23
#ifndef SPIFF_TEST_DATE_TIME_SUITE_H
 
24
#define SPIFF_TEST_DATE_TIME_SUITE_H 1
 
25
 
 
26
 
 
27
 
 
28
#include "CppTest/cpptest.h"
 
29
#include <spiff/SpiffDateTime.h>
 
30
 
 
31
 
 
32
 
 
33
class DateTimeSuite : public Test::Suite {
 
34
 
 
35
private:
 
36
        Spiff::SpiffDateTime dateTime;
 
37
 
 
38
public:
 
39
        DateTimeSuite() {
 
40
                TEST_ADD(DateTimeSuite::normal_text)
 
41
                TEST_ADD(DateTimeSuite::combined)
 
42
                TEST_ADD(DateTimeSuite::frac_1)
 
43
                TEST_ADD(DateTimeSuite::frac_2)
 
44
                TEST_ADD(DateTimeSuite::frac_3)
 
45
                TEST_ADD(DateTimeSuite::shift_maximum_1)
 
46
                TEST_ADD(DateTimeSuite::shift_maximum_2)
 
47
                TEST_ADD(DateTimeSuite::shift_zero_zed)
 
48
                TEST_ADD(DateTimeSuite::shift_zero_lowercase)
 
49
                TEST_ADD(DateTimeSuite::shift_zero_omitted)
 
50
                TEST_ADD(DateTimeSuite::all_maximum_2)
 
51
                TEST_ADD(DateTimeSuite::all_maximum_1)
 
52
                TEST_ADD(DateTimeSuite::year_too_large)
 
53
                TEST_ADD(DateTimeSuite::month_too_large)
 
54
                TEST_ADD(DateTimeSuite::day_too_large)
 
55
                TEST_ADD(DateTimeSuite::hour_too_large)
 
56
                TEST_ADD(DateTimeSuite::minute_too_large)
 
57
                TEST_ADD(DateTimeSuite::second_too_large)
 
58
                TEST_ADD(DateTimeSuite::shift_too_small)
 
59
                TEST_ADD(DateTimeSuite::shift_too_large)
 
60
                TEST_ADD(DateTimeSuite::leap_year_1)
 
61
                TEST_ADD(DateTimeSuite::leap_year_2)
 
62
                TEST_ADD(DateTimeSuite::leap_year_3)
 
63
        }
 
64
 
 
65
private:
 
66
        void normal_text();
 
67
        void combined();
 
68
        void frac_1();
 
69
        void frac_2();
 
70
        void frac_3();
 
71
        void shift_maximum_1();
 
72
        void shift_maximum_2();
 
73
        void shift_zero_zed();
 
74
        void shift_zero_lowercase();
 
75
        void shift_zero_omitted();
 
76
        void all_maximum_2();
 
77
        void all_maximum_1();
 
78
        void year_too_large();
 
79
        void month_too_large();
 
80
        void day_too_large();
 
81
        void hour_too_large();
 
82
        void minute_too_large();
 
83
        void second_too_large();
 
84
        void shift_too_small();
 
85
        void shift_too_large();
 
86
        void leap_year_1();
 
87
        void leap_year_2();
 
88
        void leap_year_3();
 
89
 
 
90
};
 
91
 
 
92
 
 
93
 
 
94
#endif // SPIFF_TEST_DATE_TIME_SUITE_H