Get test coverage to 100%
[convert-color-husl.git] / t / accessors.t
1 #!/usr/bin/perl
2 use 5.008009;
3 use strict;
4 use warnings;
5
6 use Convert::Color;
7 use Test::More tests => 16;
8
9 my @tests = (
10 [qw/husl H S L hsl/],
11 [qw/lch L C h lch/],
12 [qw/luv L u v luv/],
13 [qw/xyz X Y Z xyz/],
14 );
15
16 for (@tests) {
17 my ($name, $x, $y, $z, $xyz) = @$_;
18 my $col = Convert::Color->new("$name:1,2,3");
19 is $col->$x, 1, "\$$name->$x";
20 is $col->$y, 2, "\$$name->$y";
21 is $col->$z, 3, "\$$name->$z";
22 is_deeply [$col->$xyz], [1, 2, 3], "\$$name->$xyz"
23 }
This page took 0.02406 seconds and 4 git commands to generate.