File: 13rot.t

package info (click to toggle)
libmath-polygon-perl 1.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 256 kB
  • sloc: perl: 1,598; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 470 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
#!/usr/bin/env perl

use strict;
use warnings;

use Test::More tests => 11;

use lib '../lib';
use Math::Polygon::Calc;

my @p = polygon_start_minxy [0,0], [1,1], [-2,1], [-2,-2], [0,0];
cmp_ok(scalar(@p),'==',5);
cmp_ok($p[0][0],'==',-2);
cmp_ok($p[0][1],'==',-2);
cmp_ok($p[1][0],'==',0);
cmp_ok($p[1][1],'==',0);
cmp_ok($p[2][0],'==',1);
cmp_ok($p[2][1],'==',1);
cmp_ok($p[3][0],'==',-2);
cmp_ok($p[3][1],'==',1);
cmp_ok($p[4][0],'==',-2);
cmp_ok($p[4][1],'==',-2);