From d06dcacb042e3d9249ec20cdbf607e73e67e3da6 Mon Sep 17 00:00:00 2001 From: Marcel Otto Date: Sat, 16 Jun 2018 01:42:08 +0200 Subject: [PATCH] Add typed literal creation test for xsd:decimal --- test/unit/literal_test.exs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/unit/literal_test.exs b/test/unit/literal_test.exs index 393e9d8..32b9f19 100644 --- a/test/unit/literal_test.exs +++ b/test/unit/literal_test.exs @@ -52,6 +52,11 @@ defmodule RDF.LiteralTest do assert Literal.new("3.14", datatype: XSD.double) == RDF.Double.new("3.14") 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 assert Literal.new("foo", datatype: XSD.string) == RDF.String.new("foo") end