File Coverage

blib/lib/Dallycot/AST/StrictlyIncreasing.pm
Criterion Covered Total %
statement 12 20 60.0
branch n/a
condition n/a
subroutine 4 7 57.1
pod 0 3 0.0
total 16 30 53.3


line stmt bran cond sub pod time code
1             package Dallycot::AST::StrictlyIncreasing;
2             our $AUTHORITY = 'cpan:JSMITH';
3              
4             # ABSTRACT: Test that all values are in strictly increasing order
5              
6 23     23   11894 use strict;
  23         36  
  23         683  
7 23     23   89 use warnings;
  23         30  
  23         454  
8              
9 23     23   81 use utf8;
  23         29  
  23         96  
10 23     23   381 use parent 'Dallycot::AST::ComparisonBase';
  23         30  
  23         101  
11              
12             sub to_string {
13 0     0 0   my ($self) = @_;
14              
15 0           return join( " < ", map { $_->to_string } @{$self} );
  0            
  0            
16             }
17              
18             sub to_rdf {
19 0     0 0   my($self, $model) = @_;
20              
21 0           return $model -> apply(
22             $model -> meta_uri('loc:all-strictly-increasing'),
23             [ @$self ]
24             );
25             # my $bnode = $model->bnode;
26             # $model -> add_type($bnode, 'loc:StrictlyIncreasing');
27             #
28             # $model -> add_list($bnode, 'loc:expressions',
29             # map { $_ -> to_rdf($model) } @$self
30             # );
31             # return $bnode;
32             }
33              
34             sub compare {
35 0     0 0   my ( $self, $engine, $left_value, $right_value ) = @_;
36              
37 0           return $left_value->is_less( $engine, $right_value );
38             }
39              
40             1;