~ubuntu-branches/ubuntu/trusty/librdf-trine-perl/trusty

« back to all changes in this revision

Viewing changes to t/iterator-bindings.t

  • Committer: Package Import Robot
  • Author(s): Jonas Smedegaard, Jonas Smedegaard
  • Date: 2012-12-11 04:17:02 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20121211041702-tfqq2grzobwynjpm
Tags: 1.002-1
* New upstream release.
  Highlights:
  + Replaced old Turtle and TriG parsers with new streaming
    implementations.
  + Added RDF::Trine::Node::Literal->canonicalize method.
  + Updated RDF::Trine::Parser::Redland to construct a new parser
    object on each parse (avoiding a bug in redland).
  + Applied partial patch to 'fix interaction with
    HTML::Data::Parser'.
  + Added POD to RDF::Trine and RDF::Trine::Store::DBI.
  + Silenced undefined warnings in RDF::Trine::Parser::Turtle::Lexer.
  + Silenced warning of cartesian joins in
    RDF::Trine::Store::Hexastore.

[ Jonas Smedegaard ]
* Bump debhelper compatibility level to 8.
* Update package relations:
  + (Build-)depend on libmoose-perl and libmoosex-arrayref-perl.
  + Relax to build-depend unversioned on cdbs: Needed version
    satisfied in stable, and oldstable no longer supported.
* Update copyright file:
  + Expand Files section authored by Toby Inkster, and extend
    coverage.
  + Fix use comment and license pseudo-sections to obey silly
    restrictions of copyright format 1.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
}
18
18
 
19
19
{
20
 
        diag('simple values');
 
20
        note('simple values');
21
21
        my @values      = (1,2);
22
22
        my $sub         = sub { return shift(@values) };
23
23
        my $iter        = RDF::Trine::Iterator::Bindings->new( $sub );
27
27
}
28
28
 
29
29
{
30
 
        diag('hash values');
 
30
        note('hash values');
31
31
        my @bindings    = (
32
32
                { qw( a 1 b 2 ) },
33
33
                { qw( b 3 c 4 ) },
40
40
}
41
41
 
42
42
{
43
 
        diag('as_json with empty iterator, no variables');
 
43
        note('as_json with empty iterator, no variables');
44
44
        my $iter        = RDF::Trine::Iterator::Bindings->new( [] );
45
45
        my $expect      = '{"head":{"vars":[]},"results":{"bindings":[],"distinct":false,"ordered":false}}';
46
46
        is_json( $iter->as_json, $expect, 'as_json empty bindings iterator without names' );
47
47
}
48
48
 
49
49
{
50
 
        diag('as_json with empty iterator, 3 variables');
 
50
        note('as_json with empty iterator, 3 variables');
51
51
        my $iter        = RDF::Trine::Iterator::Bindings->new( [], [qw(a b c)] );
52
52
        my $expect      = '{"head":{"vars":["a", "b", "c"]},"results":{"bindings":[],"distinct":false,"ordered":false}}';
53
53
        is_json( $iter->as_json, $expect, 'as_json empty bindings iterator with names' );