#!/usr/bin/perl -w
BEGIN {
$| = 1;
unless
(
$ENV
{HARNESS_ACTIVE} ) {
chdir
(
$FindBin::Bin
=
$FindBin::Bin
);
lib->
import
( catdir( updir(), updir(),
'modules'
) );
}
}
my
$Waist
= Data::Vitals::Waist->new(
'38"'
);
isa_ok(
$Waist
,
'Data::Vitals::Waist'
);
is(
$Waist
->as_string,
'97cm'
,
'Returned correct string form'
);
is(
$Waist
->as_metric,
'97cm'
,
'Returned correct metric form'
);
is(
$Waist
->as_imperial,
'38"'
,
'Returned correct imperial form'
);
is(
$Waist
->as_cms,
'97cm'
,
'Returned correct cm size'
);
is(
$Waist
->as_inches,
'38"'
,
'Returned original size'
);
exit
(0);