BorderCloud/TFT-tests

Fuzzy requirement : returned datatype

Opened this issue · 1 comments

As Sebastian Schaffert said:

ROUND, CEIL, FLOOR should not require returned datatype to be the same as argument datatype
The functions ROUND, CEIL and FLOOR return by their definition an integer number without fractional part. The SPARQL 1.1 specification only requires the return value to be "numeric" and not that it matches the type of the arguments. The tests should therefore in this case only check if the results are numeric.

Can you show an example of test failed about it ?

May be the recommandation is fuzzy about it, but the unit test cannot be fuzzy.
It would be better that the return type is mandatory in recommendation in all circumstances and make a unit test for each possibility.

The unit test could be fuzzier if the comparator is more flexible.
In this case two behaviors are perfectly reasonable:

  • same datatype as argument
  • xsd:integer