summaryrefslogtreecommitdiff
path: root/t/04-Windows.t
blob: 870c19c132725677068085cdec84aa8f7066af60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/buin/perl

use strict;

use Test::More tests => 4;

use_ok('Graphics::ColorNames', 1.06, qw( hex2tuple tuple2hex ));

tie my %colors, 'Graphics::ColorNames', 'Windows';
ok(tied %colors);

ok(keys %colors == 16);

my $count = 0;
foreach my $name (keys %colors)
  {
    my @RGB = hex2tuple( $colors{$name} );
    $count++, if (tuple2hex(@RGB) eq $colors{$name} );
  }
ok($count == keys %colors);