aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorarie <arie@alleycat.cc>2021-06-23 10:34:31 +0200
committerarie <arie@alleycat.cc>2021-06-28 21:08:41 +0200
commitcb1aaf6416a155390b85eae5493793fa12f4c788 (patch)
treefbbb36b5cc6b463758ff6064a02639df1ebaaea5 /test
parent184396b507e4bff859ffb5212caccfecf341d2ed (diff)
Cleaned up some code, changed a few names. Added a test function in
bin/main for turtle strings.
Diffstat (limited to 'test')
-rw-r--r--test/alcotest/rdf_alcotest.ml2
-rw-r--r--test/alcotest/rdf_alcotest.mli2
-rw-r--r--test/turtle/main.ml20
3 files changed, 12 insertions, 12 deletions
diff --git a/test/alcotest/rdf_alcotest.ml b/test/alcotest/rdf_alcotest.ml
index b281027..63a4adb 100644
--- a/test/alcotest/rdf_alcotest.ml
+++ b/test/alcotest/rdf_alcotest.ml
@@ -62,7 +62,7 @@ let ast_predobjs =
Alcotest.testable Rdf_turtle.Ast.predobjs_pp Rdf_turtle.Ast.predobjs_equal
let ast_triples =
- Alcotest.testable Rdf_turtle.Ast.Triples.pp Rdf_turtle.Ast.Triples.equal
+ Alcotest.testable Rdf_turtle.Ast.Triple.pp Rdf_turtle.Ast.Triple.equal
let ast_directive =
Alcotest.testable Rdf_turtle.Ast.Directive.pp Rdf_turtle.Ast.Directive.equal
diff --git a/test/alcotest/rdf_alcotest.mli b/test/alcotest/rdf_alcotest.mli
index 0e6bb33..4fa3d4f 100644
--- a/test/alcotest/rdf_alcotest.mli
+++ b/test/alcotest/rdf_alcotest.mli
@@ -42,7 +42,7 @@ val ast_bnodps : Rdf_turtle.Ast.bnodps Alcotest.testable
val ast_predobjs : Rdf_turtle.Ast.predobjs Alcotest.testable
-val ast_triples : Rdf_turtle.Ast.Triples.t Alcotest.testable
+val ast_triples : Rdf_turtle.Ast.Triple.t Alcotest.testable
val ast_directive : Rdf_turtle.Ast.Directive.t Alcotest.testable
diff --git a/test/turtle/main.ml b/test/turtle/main.ml
index 5b95da4..839a7f7 100644
--- a/test/turtle/main.ml
+++ b/test/turtle/main.ml
@@ -302,14 +302,14 @@ let subject_test_case =
let triples_test_case =
let cases = [
"<http://example.org/#spiderman> <http://www.perceive.net/schemas/relationship/enemyOf> <http://example.org/#green-goblin>",
- Triples.of_subject_and_predobjs
+ Triple.of_subject_and_predobjs
(Sub_iri (Iri.of_iriref (Iriref.of_string @@ "http://example.org/#spiderman")))
([ Predicate.of_iri @@ Iri.of_iriref "http://www.perceive.net/schemas/relationship/enemyOf",
[ Obj_iri (Iri.of_iriref "http://example.org/#green-goblin"); ] ; ])
;
(* TODO write test with proper predobjs *)
"[ foaf:name \"Bob\" ]",
- Triples.of_bnodps (
+ Triple.of_bnodps (
BnodPs ([ Predicate.of_iri @@ Iri.of_prefixed_name @@ Prefixed_name.of_strings "foaf" "name",
[ Obj_literal ( Literal.make
("Bob")
@@ -359,8 +359,8 @@ let statement_test_case =
;
"<http://example.org/#spiderman>
<http://www.perceive.net/schemas/relationship/enemyOf> <http://example.org/#green-goblin> .",
- Statement.of_triples (
- Triples.of_subject_and_predobjs
+ Statement.of_triple (
+ Triple.of_subject_and_predobjs
(Sub_iri (Iri.of_iriref (Iriref.of_string @@ "http://example.org/#spiderman")))
([ Predicate.of_iri @@ Iri.of_iriref "http://www.perceive.net/schemas/relationship/enemyOf",
[ Obj_iri (Iri.of_iriref "http://example.org/#green-goblin"); ] ; ]))
@@ -368,15 +368,15 @@ let statement_test_case =
(* "<http://example.org/#spiderman> <http://www.perceive.net/schemas/relationship/enemyOf> \"literal\" .", *)
"<http://example.org/#spiderman>
<http://www.perceive.net/schemas/relationship/enemyOf> <http://example.org/#green-goblin> .",
- Statement.of_triples (
- Triples.of_subject_and_predobjs
+ Statement.of_triple (
+ Triple.of_subject_and_predobjs
(Sub_iri (Iri.of_iriref (Iriref.of_string @@ "http://example.org/#spiderman")))
([ Predicate.of_iri @@ Iri.of_iriref "http://www.perceive.net/schemas/relationship/enemyOf",
[ Obj_iri (Iri.of_iriref "http://example.org/#green-goblin"); ] ; ]))
;
"<http://example.org/#spiderman> <http://www.perceive.net/schemas/relationship/enemyOf> \"literal\" .",
- Statement.of_triples (
- Triples.of_subject_and_predobjs
+ Statement.of_triple (
+ Triple.of_subject_and_predobjs
(Sub_iri (Iri.of_iriref (Iriref.of_string @@ "http://example.org/#spiderman")))
([ Predicate.of_iri @@ Iri.of_iriref "http://www.perceive.net/schemas/relationship/enemyOf",
[ Obj_literal ( Literal.make
@@ -406,8 +406,8 @@ let turtle_test_case =
;
"<http://example.org/#spiderman> <http://www.perceive.net/schemas/relationship/enemyOf> <http://example.org/#green-goblin> .",
Turtle.of_statement_lst (
- [Statement.of_triples (
- Triples.of_subject_and_predobjs
+ [Statement.of_triple (
+ Triple.of_subject_and_predobjs
(Sub_iri (Iri.of_iriref (Iriref.of_string @@ "http://example.org/#spiderman")))
([ Predicate.of_iri @@ Iri.of_iriref "http://www.perceive.net/schemas/relationship/enemyOf",
[ Obj_iri (Iri.of_iriref "http://example.org/#green-goblin"); ] ; ]))])