Enable support for decimal literals in Turtle encoder

This commit is contained in:
Marcel Otto 2018-06-15 21:35:29 +02:00
parent f5684262e7
commit 6a357229b2
3 changed files with 4 additions and 3 deletions

View file

@ -12,7 +12,8 @@ This project adheres to [Semantic Versioning](http://semver.org/) and
- top-level alias functions for constructors of the basic datatypes - top-level alias functions for constructors of the basic datatypes
- top-level constant functions `RDF.true` and `RDF.false` for the two boolean - top-level constant functions `RDF.true` and `RDF.false` for the two boolean
RDF.Literal values RDF.Literal values
- `RDF.Decimal` datatype for `xsd:decimal` literals - `RDF.Decimal` datatype for `xsd:decimal` literals and support for decimal
literals in Turtle encoder
- `RDF.Numeric` with a list of all numeric datatypes and shared functions for - `RDF.Numeric` with a list of all numeric datatypes and shared functions for
all numeric literals all numeric literals
- the logical operators and the Effective Boolean Value (EBV) coercion algorithm - the logical operators and the Effective Boolean Value (EBV) coercion algorithm

View file

@ -13,7 +13,8 @@ defmodule RDF.Turtle.Encoder do
@native_supported_datatypes [ @native_supported_datatypes [
RDF.Datatype.NS.XSD.boolean, RDF.Datatype.NS.XSD.boolean,
RDF.Datatype.NS.XSD.integer, RDF.Datatype.NS.XSD.integer,
RDF.Datatype.NS.XSD.double RDF.Datatype.NS.XSD.double,
RDF.Datatype.NS.XSD.decimal
] ]
@rdf_type RDF.type @rdf_type RDF.type
@rdf_nil RDF.nil @rdf_nil RDF.nil

View file

@ -552,7 +552,6 @@ defmodule RDF.Turtle.EncoderTest do
end) end)
end end
@tag skip: "TODO: Decimal literals"
test "valid decimals" do test "valid decimals" do
[ [
{1.0, "1.0 ."}, {1.0, "1.0 ."},