File: 03nodes.t

package info (click to toggle)
librdf-trinex-functions-perl 0.002-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 340 kB
  • sloc: perl: 3,541; makefile: 14
file content (34 lines) | stat: -rw-r--r-- 792 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
use Test::More tests => 9;
use RDF::TrineX::Functions -all;

my $model = model();

ok(RDF::Trine::Node::Resource
	-> new('http://example.com/s')
	-> equal( iri('s', 'http://example.com/') )
);

ok(RDF::Trine::Node::Resource
	-> new('http://example.com/p')
	-> equal( iri('http://example.com/p') )
);

ok(RDF::Trine::Node::Resource
	-> new('http://example.com/p')
	-> equal( iri('http://example.com/p', 'http://example.net/') )
);

isa_ok iri('_:o') => RDF::Trine::Node::Blank;

isa_ok blank('_:o') => RDF::Trine::Node::Blank;

isa_ok blank('?o') => RDF::Trine::Node::Variable;

isa_ok variable('?o') => RDF::Trine::Node::Variable;

isa_ok literal('_:o') => RDF::Trine::Node::Literal;

ok(RDF::Trine::Node::Resource
	-> new('http://xmlns.com/foaf/0.1/name')
	-> equal( curie('foaf:name') )
);