File Coverage

xsi/Coordinate.xsi
Criterion Covered Total %
statement 17 24 70.8
branch 18 46 39.1
condition n/a
subroutine n/a
pod n/a
total 35 70 50.0


line stmt bran cond sub pod time code
1             MODULE = Geo::Geos PACKAGE = Geo::Geos::Coordinate
2             PROTOTYPES: DISABLE
3              
4 0 0         Sv getNull () { RETVAL = coordinate_get_null(); }
5              
6             Coordinate* new(SV*, double x = 0, double y = 0, SV* z = NULL) {
7 632           RETVAL = new Coordinate(x, y, z ? SvNV(z) : DoubleNotANumber);
8 316 100         }
    50          
    50          
    50          
    50          
9              
10             double Coordinate::x(SV* newval = NULL) : ALIAS(y=1,z=2) {
11             double* val;
12 8           switch (ix) {
13 3           case 0: val = &THIS->x; break;
14 3           case 1: val = &THIS->y; break;
15 2           default: val = &THIS->z; break;
16             }
17 8 50         if (newval) {
18 0 0         if (SvREADONLY(ST(0))) throw "cannot modify readonly object";
19 0 0         *val = SvNV(newval);
    0          
20             }
21 8           RETVAL = *val;
22             }
23              
24             void Coordinate::setNull() {
25 0 0         if (SvREADONLY(ST(0))) throw "cannot modify readonly object";
26 0           THIS->setNull();
27             }
28              
29 3 50         bool Coordinate::isNull()
30              
31 10 50         bool Coordinate::equals (Coordinate& other)
32              
33 6 50         bool Coordinate::equals2D (Coordinate& other)
34              
35 6 50         bool Coordinate::equals3D (Coordinate& other)
36              
37 6 50         int Coordinate::compareTo (Coordinate& other)
38              
39             bool Coordinate::eq (Sv other_arg, SV*) {
40 48 50         auto* other = xs::in(other_arg);
41 48 50         RETVAL = other ? THIS->equals(*other) : false;
    50          
42             }
43              
44              
45 132 50         std::string Coordinate::toString (...)
    50          
46              
47 6 50         double Coordinate::distance (Coordinate& other)
48              
49 0 0         int Coordinate::hashCode ()
50              
51 0           int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; }