- 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
14 lines
486 B
Elixir
14 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
|