aboutsummaryrefslogtreecommitdiff
path: root/test/turtle/main.ml
diff options
context:
space:
mode:
authorarie <arie@alleycat.cc>2021-06-07 12:36:46 +0200
committerarie <arie@alleycat.cc>2021-06-28 21:02:44 +0200
commit23adcf64b873ad6b0c97d288e4066786faf96c32 (patch)
tree584903687e73c31a68ded1bae86cae0bf5aa4bde /test/turtle/main.ml
parent8bb06986550c075d9120e0a3619b3e7af01b2871 (diff)
Small change in predobjs parser
Diffstat (limited to 'test/turtle/main.ml')
-rw-r--r--test/turtle/main.ml30
1 files changed, 9 insertions, 21 deletions
diff --git a/test/turtle/main.ml b/test/turtle/main.ml
index c2c3b86..ea13811 100644
--- a/test/turtle/main.ml
+++ b/test/turtle/main.ml
@@ -185,6 +185,14 @@ let object_test_case =
let bnodeps_test_case =
let cases = [
+ "[ foaf:name \"Bob\" ]",
+ Turtle.BNodePs ([ Turtle.Predicate.of_iri @@ Turtle.Iri.of_prefixed_name @@ Turtle.Prefixed_name.of_strings "foaf" "name",
+ [ Turtle.Obj_literal ( Turtle.Literal.make
+ ("Bob")
+ (Turtle.Iri.of_prefixed_name @@ Turtle.Prefixed_name.of_strings "xsd" "string"))
+ ]
+ ])
+ ;
] in
test_case "bnodeps" `Quick
(fun () ->
@@ -217,26 +225,6 @@ let predobjs_test_case =
(Result.ok @@ v))
cases)
-let test_test_case =
- let cases = [
- " foaf:name \"Bob\" ",
- [ Turtle.Predicate.of_iri @@ Turtle.Iri.of_prefixed_name @@ Turtle.Prefixed_name.of_strings "foaf" "name",
- [ Turtle.Obj_literal ( Turtle.Literal.make
- ("Bob")
- (Turtle.Iri.of_prefixed_name @@ Turtle.Prefixed_name.of_strings "xsd" "string"))
- ]
- ]
- ;
- ] in
- test_case "predobjs" `Quick
- (fun () ->
- List.iter
- (fun (enc, v) ->
- check (result Rdf_alcotest.ast_predobjs string)
- "can parse"
- (parse Parser.test_parser enc)
- (Result.ok @@ v))
- cases)
let () =
Alcotest.run "Turtle" [
"Basic parsers", [
@@ -247,7 +235,7 @@ let () =
iri_test_case;
literal_test_case;
predicate_test_case;
-(* object_test_case; *)
+ object_test_case;
bnodeps_test_case;
predobjs_test_case;
]