From 34123b9d0460b50118a76290aafa0fc31eb365b1 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 7 Oct 2014 13:38:16 -0400 Subject: add some accessors --- t/P3.t | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 't') diff --git a/t/P3.t b/t/P3.t index 5712ace..3c75def 100644 --- a/t/P3.t +++ b/t/P3.t @@ -6,6 +6,13 @@ use Test::More; use Image::PNM; my $image = Image::PNM->new('t/data/P3.pnm'); + +is($image->width, 8); +is($image->height, 8); +is($image->max_pixel_value, 255); +is_deeply($image->raw_pixel(1, 3), [0, 84, 255]); +is_deeply($image->pixel(4, 2), [1, 0, 0]); + is($image->as_string('P3'), <