File: BSpline.t

package info (click to toggle)
libmath-gsl-perl 0.45-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 192,156 kB
  • sloc: ansic: 895,524; perl: 24,682; makefile: 12
file content (35 lines) | stat: -rw-r--r-- 732 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package Math::GSL::BSpline::Test;
use Math::GSL::Test qw/:all/;
use base q{Test::Class};
use Test::Most;
use Math::GSL          qw/:all/;
use Math::GSL::BSpline qw/:all/;
use Math::GSL::Errno   qw/:all/;
use Data::Dumper;
use strict;
use warnings;

BEGIN { gsl_set_error_handler_off() }

sub make_fixture : Test(setup) {
}
sub teardown : Test(teardown) {
}


sub BASIC : Tests {
    my $bspline = gsl_bspline_alloc(4,10);
    ok(defined $bspline, 'gsl_bspline_alloc');

    my $status  = gsl_bspline_knots_uniform(0,5, $bspline);
    ok_status($status);

    my $ncoeffs = gsl_bspline_ncoeffs($bspline);
    cmp_ok($ncoeffs, '==', 12, 'ncoeffs');

    lives_ok {
        gsl_bspline_free($bspline);
    };
}

Test::Class->runtests;