The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more
|
BEGIN { $| = 1; print "1..4\n" ; }
END { print "not ok 1\n" unless $loaded ;}
$loaded = 1;
print "ok 1\n" ;
print "Testing printing: 500.000\n" ;
$number = number( value => 500, places => 3);
print "$number\n2 ok\n" ;
print "Testing numerical comparison:\n3 " ;
print STDOUT ( $number == 500) ? 'ok' : 'failed' ;
print "\n" ;
print "Testing string comparison:\n4 " ;
print STDOUT ( "$number" eq '500.000' ) ? 'ok' : 'failed' ;
print "\n" ;
print "End of tests\n" ;
|