Engauge Digitizer  2
TestFormats.h
1 #ifndef TEST_FORMATS_H
2 #define TEST_FORMATS_H
3 
4 #include <QObject>
5 #include <QValidator>
6 
8 class TestFormats : public QObject
9 {
10  Q_OBJECT
11  public:
13  explicit TestFormats(QObject *parent = 0);
14 
15  signals:
16 
17  private slots:
18  void cleanupTestCase ();
19  void initTestCase ();
20 
21  void testDateTime ();
22  void testDateTime2 ();
23  void testDateTime20 ();
24  void testDateTime201 ();
25  void testDateTime2015 ();
26  void testDateTime2015Slash ();
27  void testDateTime2015Slash0 ();
28  void testDateTime2015Slash01 ();
29  void testDateTime2015Slash01Slash ();
30  void testDateTime2015Slash01Slash0 ();
31  void testDateTime2015Slash01Slash02 ();
32  void testDateTime2015Slash01Slash02Space ();
33  void testDateTime2015Slash01Slash02Space0 ();
34  void testDateTime2015Slash01Slash02Space01 ();
35  void testDateTime2015Slash01Slash02Space01Colon ();
36  void testDateTime2015Slash01Slash02Space01Colon0 ();
37  void testDateTime2015Slash01Slash02Space01Colon02 ();
38  void testDateTime2015Slash01Slash02Space01Colon02Colon ();
39  void testDateTime2015Slash01Slash02Space01Colon02Colon0 ();
40  void testDateTime2015Slash01Slash02Space01Colon02Colon03 ();
41  void testDateTime2015Slash01Slash02Space01Colon02Colon03Space ();
42  void testDateTime2015Slash01Slash02Space01Colon02Colon03SpaceA ();
43  void testDateTime2015Slash01Slash02Space01Colon02Colon03SpaceAM ();
44  void testDegreesMinutesSeconds ();
45  void testDegreesMinutesSeconds180 ();
46  void testDegreesMinutesSeconds180Space ();
47  void testDegreesMinutesSeconds180Space10 ();
48  void testDegreesMinutesSeconds180Space10Space ();
49  void testDegreesMinutesSeconds180Space10Space20 ();
50 
51  private:
52  bool stateDegreesMinutesSeconds (const QString &string, QValidator::State stateExpected);
53  bool stateYearMonthDayHourMinuteSecond (const QString &string, QValidator::State stateExpected);
54 
55 };
56 
57 #endif // TEST_FORMATS_H
Unit tests of formats.
Definition: TestFormats.h:8
TestFormats(QObject *parent=0)
Single constructor.
Definition: TestFormats.cpp:10