Skip to content

Commit 448ce5e

Browse files
authored
Merge pull request #31 from kg-construct/fix-test-cases
added documentation and fixed 0006
2 parents 78ad74c + f41bbc2 commit 448ce5e

File tree

5 files changed

+49
-5
lines changed

5 files changed

+49
-5
lines changed

test-cases/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# FNML Test Cases
2+
3+
Each test case is within a subfolder of this folder.
4+
5+
If no output.nq file is present, an error is expected.
6+
7+
## Open issues for which there are no test cases
8+
9+
| title | purpose |
10+
|:---------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------:|
11+
| Function on object, 1 constant parameter | Tests if a constant parameter can be used |
12+
| Function on object, wrong type parameter | Tests a function with a wrong type parameter cannot be used |
13+
| Function on object returns null | Tests that no triple should be generated when the result is null. |
14+
| Function on object returns empty string | Tests that a triple is generated when the results is an empty string. |
15+
| Function on object, the output termType is Literal | Tests if the output of the function is assigned the correct termType |
16+
| Function on subject returns invalid IRI | Tests that no triples are generated for a subject that gets an invalid IRI as the result from a function. |
17+
| Function on predicate returns invalid IRI | Tests that no triples are generated for a predicate that gets an invalid IRI as the result from a function. |
18+
| Nested function - Test B | Tests if a composite function of form f(g(x1),h(x2)) works (i.e., two different inner functions are the arguments of the outer function) |
19+
| Nested function - Test C | Tests if a composite function of form f(g(h(x1),x2),x3) works (i.e., the inner function is also a composite function) |
20+
| Function on graph, 1 parameter | Tests if a function can be used on a graph |
21+
| Function on languageMap | Tests that function on LanguageMap is handled |
22+
| Function on graph returns invalid IRI | Tests that no triples are generated for a graph that gets an invalid IRI as the result from a function. |
23+
| Function using non-constant shortcut property function | Tests that a non-constant FNML Function map also works |
24+
| Function using non-constant shortcut property return | Tests that a non-constant FNML Return map also works |
25+
| Function as equal join condition | Tests that functions can be used similar to R2RML (equal) join conditions |
26+
| Function as other type of join condition | Tests that functions can be used for other types of join conditions (eg. string_contains or listContainsElement) |
27+
| Function, parameter as array | Tests that list-style parameters are handled |
28+
| Function, array_get | Tests that list-style of returned data values are handled correctly by FnO |
29+
30+
## Table
31+
32+
| new_id | title | purpose | data format | error expected? | input file 1 |
33+
|:------:|:---------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------:|:-----------:|:---------------:|:-----------------:|
34+
| 0000 | Function on object, 0 parameters | Tests (1) if a function without parameters can be used (FnO) (2) if a function on an object map can be used (Term) | CSV | FALSE | student.csv |
35+
| 0000 | Function on object, default termType | Tests if the output of the function is assigned the correct termType by default | | | |
36+
| 0001 | Function on object, 1 reference parameter | Tests: (1) if a function with one parameter can be used, (FnO) (2) a reference parameter can be used (Term) | CSV | FALSE | student.csv |
37+
| 0001 | Function using non-constant shortcut property parameter | Tests that a non-constant FNML Parameter map also works | CSV | FALSE | student_param.csv |
38+
| 0002 | Function on object, 1 false reference parameter | Tests if a false reference parameters is caught | CSV | TRUE | student.csv |
39+
| 0003 | Function on object, 1 reference parameter, 1 constant parameter | Tests if a function with multiple parameters can be used | CSV | FALSE | student.csv |
40+
| 0004 | Function on predicate, 1 parameter | Tests if a function can be used on a predicate | CSV | FALSE | student.csv |
41+
| 0005 | Function on subject, 1 parameter | Tests if a function can be used on a subject | CSV | FALSE | student.csv |
42+
| 0005 | Function on subject, default termType | Tests if the default termType assigned to the output of the function to be correct | | | |
43+
| 0006 | Function on object, the output termType is IRI | Tests if the output of the function is assigned the correct termType | | | |
44+
| 0008 | Function on object, 1 template parameter | Tests if a function with a template parameter can be used | CSV | FALSE | student.csv |
45+
| 0009 | Nested function - Test A | Tests if a composite function of form f(g(x1),x2) works (i.e., the inner function is only one argument of the outer function) | CSV | FALSE | student.csv |

test-cases/RMLFNOTC0002-CSV/output.nq

Lines changed: 0 additions & 1 deletion
This file was deleted.

test-cases/RMLFNOTC0006-CSV/mapping.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
[
3232
rml:parameter idlab-fn:str ;
3333
rml:inputValueMap [
34-
rml:reference "Name"
34+
rml:reference "url"
3535
];
3636
] .

test-cases/RMLFNOTC0006-CSV/output.nq

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> <http://VENUS> .
1+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> <HTTP://EXAMPLE.COM/VENUS> .
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Id,Name,Comment,Class
2-
1,Venus,A&B,A
1+
Id,Name,Comment,Class,url
2+
1,Venus,A&B,A,http://example.com/venus

0 commit comments

Comments
 (0)