Adding documentation for some FFT functions, an example in the documentation and...
[Math-GSL.git] / t / GSL.t
blobfb10b0ae6bb249dd1673ffc0b5aa6cc1a158c842
1 use Test::More 'no_plan';
2 use Math::GSL qw/:all/;
3 use Math::GSL::SF qw/:all/;
4 use Math::GSL::Test qw/:all/;
5 use Math::GSL::Errno qw/:all/;
6 use Data::Dumper;
7 use strict;
10     my $results = { 
11                 q{is_similar(undef, [1,2,3]) } => 0 ,
12                 q{is_similar(0.10005,0.1000501, 1e-5)}  => 1,
13                 q{is_similar(0.10005,0.1000501, 1e-7)}  => 0,
14                 q{is_similar([1,2,3    ], [1,2,3.001])} => 0, 
15                 q{is_similar([1,2,3.001], [1,2,3.001])} => 1, 
16                 q{is_similar([1,2,3.001], [1,2,3.001],1e-2)} => 1, 
17                 q{is_similar([1,2,3.0010001], [1,2,3.0010002], 1e-5)} => 1, 
18                 q{is_similar([1,2,3.0010001], [1,2,3.0010002] )}      => 0, 
19                 q{is_similar_relative( 1e8, 1e8 + 1, 1e-7) } => 1,
20                 q{is_similar_relative( 1e8, 1e8 + 1e3, 1e-7) } => 0,
21     };
23     verify($results, 'Math::GSL');
26         ok_status(0,$GSL_SUCCESS);
27         ok_status(0);
30     my $fh = gsl_fopen('mrfuji','w');
31     ok(defined $fh, 'gsl_fopen can create files');
32     ok_status(gsl_fclose($fh));
35     my $fh = gsl_fopen('mrfuji','r');
36     ok(defined $fh, 'gsl_fopen can read files');
37     ok_status(gsl_fclose($fh));
38     unlink 'mrfuji' if -e 'mrfuji';