Refactor inclusion of system.i to one place
[Math-GSL.git] / t / ODEIV.t
blob240a268bbb175b006606d7bcc993f8651c499e35
1 package Math::GSL::ODEIV::Test;
2 use strict;
3 use base q{Test::Class};
4 use Test::More tests => 4;
5 use Math::GSL        qw/:all/;
6 use Math::GSL::ODEIV qw/:all/;
7 use Math::GSL::Errno qw/:all/;
8 use Math::GSL::Test  qw/:all/;
9 use Data::Dumper;
11 BEGIN { gsl_set_error_handler_off(); }
13 sub make_fixture : Test(setup) {
14     my $self = shift;
17 sub teardown : Test(teardown) {
20 sub GSL_ODEIV_STEP_ALLOC : Tests {
21     my $step = gsl_odeiv_step_alloc($gsl_odeiv_step_rk2, 3);
22     isa_ok( $step, 'Math::GSL::ODEIV' ); 
25 sub GSL_ODEIV_EVOLVE_ALLOC : Tests {
26     my $evolver = gsl_odeiv_evolve_alloc(2);
27     isa_ok( $evolver, 'Math::GSL::ODEIV' );
30 sub NAME : Tests {
31     my $s = gsl_odeiv_step_alloc($gsl_odeiv_step_rk2, 3);
32     my $name = gsl_odeiv_step_name ($s);
33     ok($name eq "rk2");
36 sub GSL_ODEIV_CONTROL_ALLOC : Tests {
37     local $TODO = "need a way to create a gsl_odeiv_control_type struct";
38     my $control;
40     ok( defined $gsl_odeiv_control_standard,'standard control type exists');
41     # This will blowup with an undef control type
42     if (defined $gsl_odeiv_control_standard ){
43         $control = gsl_odeiv_control_alloc($gsl_odeiv_control_standard);
44         isa_ok( $control, 'Math::GSL::ODEIV' );
45     }
47 Test::Class->runtests;