File: fibonacci.t

package info (click to toggle)
libheap-perl 0.80-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 196 kB
  • ctags: 87
  • sloc: perl: 1,161; makefile: 2
file content (39 lines) | stat: -rw-r--r-- 590 bytes parent folder | download | duplicates (3)
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
36
37
38
39
#!/usr/bin/perl -w

use Test::More;
use strict;

BEGIN
   {
   plan tests => 4;
   chdir 't' if -d 't';
   use lib '../lib';
   use_ok ("Heap::Fibonacci") or die($@);
   };

can_ok ("Heap::Fibonacci", qw/
  new

  elem
  absorb
  add
  ascending_cut
  decrease_key
  delete
  consolidate
  link_to_left_of
  link_as_parent_of 

  minimum
  top

  extract_top
  extract_minimum
  /);

my $heap = Heap::Fibonacci->new();

like (ref($heap), qr/Heap::Fibonacci/, 'new returned an object');

my $ver = $Heap::Fibonacci::VERSION;
ok ($ver >= 0.80, "Heap::Fibonacci::VERSION >= 0.80 (is: $ver)");