Get test coverage to 100%
[convert-color-husl.git] / t / accessors.t
CommitLineData
ddcfafb2
MG
1#!/usr/bin/perl
2use 5.008009;
3use strict;
4use warnings;
5
6use Convert::Color;
7use Test::More tests => 16;
8
9my @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
16for (@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.009367 seconds and 4 git commands to generate.