Move tests out of lib/Math/GSL/*/Test.pm into t/*.t directly
[Math-GSL.git] / t / Roots.t
blobb5df3301b0ada5cdd6f20e788acf5587a70f588f
1 package Math::GSL::Roots::Test;
2 use strict;
3 use base q{Test::Class};
4 use Test::More;
5 use Math::GSL        qw/:all/;
6 use Math::GSL::Roots qw/:all/;
7 use Math::GSL::Test  qw/:all/;
9 sub make_fixture : Test(setup) {
10     my $self = shift;
11     $self->{roots} =gsl_root_fsolver_alloc($gsl_root_fsolver_bisection);
14 sub teardown : Test(teardown) {
17 sub GSL_ROOTS_ALLOC_FREE : Tests {
18     my $self = shift;
19     my $x = $self->{roots};
20     isa_ok($x, 'Math::GSL::Roots', 'gsl_root_fsolver_alloc' );
21     gsl_root_fsolver_free($x);
22     ok(!$@, 'gsl_root_fsolver_free');
25 sub SOlVER_TYPES : Tests {
26     ok( defined $gsl_root_fsolver_bisection );
27     ok( defined $gsl_root_fsolver_brent);
28     ok( defined $gsl_root_fsolver_falsepos);     
29     ok( defined $gsl_root_fdfsolver_newton );    
30     ok( defined $gsl_root_fdfsolver_secant  );   
31     ok( defined $gsl_root_fdfsolver_steffenson); 
34 Test::Class->runtests;