File Coverage

xsi/precision/GeometryPrecisionReducer.xsi
Criterion Covered Total %
statement 11 14 78.5
branch 16 38 42.1
condition n/a
subroutine n/a
pod n/a
total 27 52 51.9


line stmt bran cond sub pod time code
1             MODULE = Geo::Geos PACKAGE = Geo::Geos::Precision::GeometryPrecisionReducer
2             PROTOTYPES: DISABLE
3              
4             Sv new(SV*, SV* arg0) {
5             GeometryPrecisionReducer* self;
6 2 50         Object arg{arg0};
    50          
7 1 50         if (arg.stash().name() == "Geo::Geos::PrecisionModel") {
    50          
    50          
8 1 50         PrecisionModel& pm = xs::in(arg);
9 1 50         self = new GeometryPrecisionReducer(pm);
10             }
11             else {
12 0 0         GeometryFactory& gf = xs::in(arg);
13 0 0         self = new GeometryPrecisionReducer(gf);
    0          
14             }
15 2 50         Object wrapped = xs::out(self);
    50          
    50          
16 1 50         wrapped.payload_attach(SvRV(arg0), &payload_marker);
17 1 50         RETVAL = wrapped.ref();
    50          
18             }
19              
20 1           void GeometryPrecisionReducer::setRemoveCollapsedComponents(bool remove)
21              
22 1           void GeometryPrecisionReducer::setPointwise (bool pointwise)
23              
24             Sv GeometryPrecisionReducer::reduce(Geometry& g) {
25 2 50         auto ptr = THIS->reduce(g);
    50          
26 1 50         RETVAL = Helper::uplift(ptr.release());
27             }
28              
29 0           int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; }