1: /** @file test_zonetime.cpp
2: Test driver for the ZoneTime class.
3: */
5: #include <iostream>
6: using namespace std;
8: #include "zonetime.h"
10: int main()
11: {
12: ZoneTime t1;
13: ZoneTime t2(5);
14: ZoneTime t3(5, 30);
15: ZoneTime t4(5, 30, 10);
16: ZoneTime t5(5, 30, 10, CDT);
18: cout << "\nt1: "; t1.display();
19: cout << "\nt2: "; t2.display();
20: cout << "\nt3: "; t3.display();
21: cout << "\nt4: "; t4.display();
22: cout << "\nt5: "; t5.display();
23: cout << "\nPress Enter to continue ... "; cin.ignore(80, '\n');
25: ZoneTime t;
26: t.set(23, 59, 55, PST);
27: cout << "\nt: "; t.display();
28: cout << "\nPress Enter to continue ... "; cin.ignore(80, '\n');
30: cout << "\nIncrementing t:" << endl;
31: for (int count = 1; count <= 10; count++)
32: {
33: t.display();
34: cout << ' ';
35: t.increment();
36: cout << endl;
37: }
38: cout << "Press Enter to continue ... "; cin.ignore(80, '\n');
39: }