rdf-ex/test/unit/datatypes/string_test.exs
Marcel Otto 2b9aa62d69 core: yet another approach for RDF.Literal
- we now only the store the lexical form when it's non-canonical
- Literal validation and canonicalization
- a general RDF.Datatype.Test.Case
- also tested datatype implementations for booleans, integers, string and langStrings
- use literal sigils in Inspect implementation of Literals when possible
2017-04-23 23:41:29 +02:00

15 lines
486 B
Elixir

defmodule RDF.StringTest do
use RDF.Datatype.Test.Case, datatype: RDF.String, id: RDF.NS.XSD.string,
valid: %{
# input => { value , lexical , canonicalized }
"foo" => { "foo" , nil , "foo" },
0 => { "0" , nil , "0" },
42 => { "42" , nil , "42" },
3.14 => { "3.14" , nil , "3.14" },
true => { "true" , nil , "true" },
false => { "false" , nil , "false" },
},
invalid: []
end