File Coverage

xsi/Triangle.xsi
Criterion Covered Total %
statement 22 24 91.6
branch 14 28 50.0
condition n/a
subroutine n/a
pod n/a
total 36 52 69.2


line stmt bran cond sub pod time code
1             MODULE = Geo::Geos PACKAGE = Geo::Geos::Triangle
2             PROTOTYPES: DISABLE
3              
4 2           Triangle* new(SV*, Coordinate& p0, Coordinate& p1, Coordinate& p2)
5 1 50          
6             Coordinate* Triangle::p0(Coordinate* newval = NULL) : ALIAS(p1=1,p2=2) {
7 6           Coordinate* val;
8             switch (ix) {
9 3           case 0: val = &THIS->p0; break;
10 1           case 1: val = &THIS->p1; break;
11 1           default: val = &THIS->p2; break;
12 1           }
13             if (newval) {
14 3 50         *val = *newval;
15 0           }
16             RETVAL = new Coordinate(*val);
17 3 50         }
18              
19             Coordinate* Triangle::inCentre() {
20 2           Coordinate c;
21 1 50         THIS->inCentre(c);
22 1 50         RETVAL = new Coordinate(c);
23 1 50         }
24              
25             Coordinate* Triangle::circumcentre() {
26 2           Coordinate c;
27 1 50         THIS->circumcentre(c);
28 1 50         RETVAL = new Coordinate(c);
29 1 50         }
30              
31             bool isInCircleNonRobust(Coordinate& a, Coordinate& b, Coordinate& c, Coordinate& p): ALIAS(isInCircleNormalized=1, isInCircleRobust=2) {
32 3           switch(ix) {
33 1 50         case 0: RETVAL = TrianglePredicate::isInCircleNonRobust(a, b, c, p); break;
34 1 50         case 1: RETVAL = TrianglePredicate::isInCircleNormalized(a, b, c, p); break;
35 1 50         default: RETVAL = TrianglePredicate::isInCircleRobust(a, b, c, p); break;
36             }
37             }
38              
39              
40 0           int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; }
41              
42             BOOT {
43 46 50         xs::exp::autoexport(Stash(__PACKAGE__));
    50          
44             }