Adding Time::Piece to the core...again.
[p5sagit/p5-mst-13.2.git] / ext / Time / Piece / t / 01base.t
1 use Test::More tests => 7;
2
3 BEGIN { use_ok('Time::Piece'); }
4
5 my $t = gmtime(315532800); # 00:00:00 1/1/1980
6
7 isa_ok($t, 'Time::Piece', 'specific gmtime');
8
9 cmp_ok($t->year, '==', 1980, 'correct year');
10
11 cmp_ok($t->hour, '==',    0, 'correct hour');
12
13 cmp_ok($t->mon,  '==',    1, 'correct mon');
14
15 my $g = gmtime;
16 isa_ok($g, 'Time::Piece', 'current gmtime');
17
18 my $l = localtime;
19 isa_ok($l, 'Time::Piece', 'current localtime');