File: count.t

package info (click to toggle)
libmath-vector-real-kdtree-perl 0.15-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 136 kB
  • sloc: perl: 1,385; makefile: 3
file content (16 lines) | stat: -rw-r--r-- 355 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl
use strict;
use warnings;

use Test::More tests => 40;

use Math::Vector::Real::kdTree;

my $tree = Math::Vector::Real::kdTree->new();
my @is;
for my $i (0..39) {
    push @is, $i;
    $tree->insert(Math::Vector::Real->new($i));
    my @all = sort { $a <=> $b } $tree->ordered_by_proximity;
    is ("@all", "@is", "count indexes - $i");
}