rdf-ex/test/unit/xsd/xsd_test.exs
Marcel Otto 5819eec0cf Re-integrate XSD.ex
It turned out that the costs of separating the XSD datatypes are too high
and probably not worth the effort, since with its limited scope
probably nobody would want to use XSD.ex outside of the RDF.ex context
anyway.
2020-05-05 23:58:44 +02:00

17 lines
490 B
Elixir

defmodule RDF.XSDTest do
use RDF.Test.Case
doctest RDF.XSD
test "Datatype constructor alias functions" do
Enum.each(XSD.datatypes(), fn datatype ->
assert apply(XSD, String.to_atom(datatype.name), [1]) == datatype.new(1)
assert apply(XSD, String.to_atom(Macro.underscore(datatype.name)), [1]) == datatype.new(1)
end)
end
test "true and false aliases" do
assert XSD.true == XSD.Boolean.new(true)
assert XSD.false == XSD.Boolean.new(false)
end
end