summaryrefslogtreecommitdiff
path: root/t/02-X.t
diff options
context:
space:
mode:
Diffstat (limited to 't/02-X.t')
-rw-r--r--t/02-X.t55
1 files changed, 27 insertions, 28 deletions
diff --git a/t/02-X.t b/t/02-X.t
index 0923507..7f57d4e 100644
--- a/t/02-X.t
+++ b/t/02-X.t
@@ -1,28 +1,27 @@
-#!/usr/bin/perl
-
-use strict;
-
-use Test::More tests => 19;
-
-use_ok('Graphics::ColorNames', 2.1002, qw( hex2tuple tuple2hex ));
-
-tie my %colors, 'Graphics::ColorNames', 'X';
-ok(tied %colors);
-
-ok(keys %colors == 665); #
-
-my $count = 0;
-foreach my $name (keys %colors)
- {
- my @RGB = hex2tuple( $colors{$name} );
- $count++, if (tuple2hex(@RGB) eq $colors{$name} );
- }
-ok($count == keys %colors);
-
-foreach my $ad (qw( royal dodger slate sky steel )) {
- foreach my $col (qw( blue )) {
- ok(exists $colors{"$ad$col"});
- ok($colors{"$ad$col"} eq $colors{"$ad $col"}, "$ad $col");
- ok($colors{"$ad-$col"} eq $colors{"$ad $col"}, "$ad $col");
- }
-}
+#!/usr/bin/perl
+
+use strict;
+
+use Test::More tests => 19;
+
+use_ok( 'Graphics::ColorNames', 2.1002, qw( hex2tuple tuple2hex ) );
+
+tie my %colors, 'Graphics::ColorNames', 'X';
+ok( tied %colors );
+
+is( scalar(keys %colors), 676 ); #
+
+my $count = 0;
+foreach my $name ( keys %colors ) {
+ my @RGB = hex2tuple( $colors{$name} );
+ $count++, if ( tuple2hex(@RGB) eq $colors{$name} );
+}
+ok( $count == keys %colors );
+
+foreach my $ad (qw( royal dodger slate sky steel )) {
+ foreach my $col (qw( blue )) {
+ ok( exists $colors{"$ad$col"} );
+ ok( $colors{"$ad$col"} eq $colors{"$ad $col"}, "$ad $col" );
+ ok( $colors{"$ad-$col"} eq $colors{"$ad $col"}, "$ad $col" );
+ }
+}