Refactor Linalg tests and make them pass on FreeBSD 6.2/perl 5.10.0.
[Math-GSL.git] / t / Deriv.t
blobe44f7f2185f475e4abe73be8e2b06e962ef1d96d
1 use Test::More 'no_plan';
2 use Math::GSL qw/:all/;
3 use Math::GSL::Deriv qw/:all/;
4 use Math::GSL::Errno qw/:all/;
5 use Data::Dumper;
6 use strict;
7 use warnings;
9 BEGIN{ gsl_set_error_handler_off() };
12     local $TODO = "gsl_function *";
13     my ($x,$h)=(5,0.01);
15     my $gsl_func = Math::GSL::Deriv::gsl_function_struct->new;
17     isa_ok( $gsl_func, 'Math::GSL::Deriv::gsl_function_struct' );
20     $gsl_func->swig_function_set( sub { print "FOO\n" } );
21     my $func = $gsl_func->swig_function_get();
22     ok( ref $func eq 'CODE', 'swig_function_get works' );
24     my $params = $gsl_func->swig_params_set(0);
25     ok( defined $params, 'swig_params_set works' );
27     my ($value, $result, $abserr);
28     print "about to call deriv_central\n";
29     #($value, $abserr) = gsl_deriv_central ( $gsl_func, $x, $h, $result, $abserr); 
30     print Dumper [ $value, $abserr ];