Add typed literal creation test for xsd:decimal
This commit is contained in:
parent
6a357229b2
commit
d06dcacb04
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue