5 use Test
::More tests
=> 17;
6 BEGIN { use_ok
('Algorithm::BIT::XS') };
7 BEGIN { use_ok
('Algorithm::BIT2D::XS') };
9 my $bit = Algorithm
::BIT
::XS
->new(100);
22 is
$bit->query(25), 52;
26 is
$bit->query(25), 32;
31 is
$bit->query(15), 0;
32 is
$bit->query(16), 10;
35 my $bit2d = Algorithm
::BIT2D
::XS
->new(100, 50);
36 is
$bit2d->query(5, 5), 0;
37 $bit2d->update(4, 4, 2);
38 $bit2d->update(5, 1, 3);
39 is
$bit2d->query(5, 5), 5;
40 is
$bit2d->query(5, 2), 3;
This page took 0.025282 seconds and 4 git commands to generate.