File: binomial.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 (41 lines) | stat: -rw-r--r-- 584 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
40
41
#!/usr/bin/perl -w

use Test::More;
use strict;

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

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

  elem
  absorb
  add
  decrease_key
  delete

  minimum
  top

  extract_top
  extract_minimum

  moveto
  link_to
  absorb_children
  self_union_once
  self_union
  /);

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

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

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