1 package Math::GSL::Const::Test;
2 use base q{Test::Class};
3 use Test::More tests => 6;
4 use Math::GSL qw/:all/;
5 use Math::GSL::SF qw/:all/;
6 use Math::GSL::Const qw/:all/;
7 use Math::GSL::Test qw/:all/;
10 sub make_fixture : Test(setup) {
14 sub teardown : Test(teardown) {
17 sub GSL_CONST_CGS : Tests {
19 cmp_ok( $GSL_CONST_CGS_SPEED_OF_LIGHT ,'==', 29979245800 );
22 sub MATH_CONSTANTS : Tests {
24 ok_similar( gsl_sf_log($M_E), 1,'ln($M_E)=1');
25 ok_similar( gsl_sf_exp($M_LN2), 2,'e^($M_LN2)=2' );
26 ok_similar( gsl_sf_exp($M_LNPI), $M_PI ,'e^($M_LNPI)=$M_PI');
27 ok_similar( $M_SQRT2 ** 2, 2,'($M_SQRT2)**2=2' );
28 ok_similar( $M_EULER, 0.577215664901532860606512090082 );
31 Test::Class->runtests;