Add typed literal creation test for xsd:decimal

This commit is contained in:
Marcel Otto 2018-06-16 01:42:08 +02:00
parent 6a357229b2
commit d06dcacb04

View file

@ -52,6 +52,11 @@ defmodule RDF.LiteralTest do
assert Literal.new("3.14", datatype: XSD.double) == RDF.Double.new("3.14") assert Literal.new("3.14", datatype: XSD.double) == RDF.Double.new("3.14")
end end
test "decimal" do
assert Literal.new(3.14, datatype: XSD.decimal) == RDF.Decimal.new(3.14)
assert Literal.new("3.14", datatype: XSD.decimal) == RDF.Decimal.new("3.14")
end
test "string" do test "string" do
assert Literal.new("foo", datatype: XSD.string) == RDF.String.new("foo") assert Literal.new("foo", datatype: XSD.string) == RDF.String.new("foo")
end end