Debian Codegraph @

t/08name.t

raw
1 use strict;
2 use warnings;
3
4 use lib 't/lib';
5 use T::RequireDateTime;
6
7 use Test::More;
8
9 use DateTime::TimeZone;
10
11 {
12 my $tz = DateTime::TimeZone->new( name => '-0300' );
13 is( $tz->name, '-0300', 'name should match value given in constructor' );
14 }
15
16 {
17 my $tz = DateTime::TimeZone->new( name => 'floating' );
18 is(
19 $tz->name, 'floating',
20 'name should match value given in constructor'
21 );
22 }
23
24 {
25 my $tz = DateTime::TimeZone->new( name => 'America/Chicago' );
26 is(
27 $tz->name, 'America/Chicago',
28 'name should match value given in constructor'
29 );
30 }
31
32 {
33 my $tz = DateTime::TimeZone->new( name => 'UTC' );
34 is( $tz->name, 'UTC', 'name should match value given in constructor' );
35 }
36
37 done_testing();