2017-06-11 15:23:58 +00:00
|
|
|
defmodule RDFTest do
|
2017-06-16 22:44:11 +00:00
|
|
|
use RDF.Test.Case
|
2017-04-20 21:09:55 +00:00
|
|
|
|
2016-10-15 16:26:56 +00:00
|
|
|
doctest RDF
|
2018-04-07 20:59:03 +00:00
|
|
|
|
|
|
|
test "Datatype constructor alias functions" do
|
|
|
|
RDF.Datatype.modules
|
|
|
|
|> Enum.each(fn datatype ->
|
|
|
|
"rdf/" <> alias_name = datatype |> Macro.underscore
|
|
|
|
assert apply(RDF, String.to_atom(alias_name), [1]) == datatype.new(1)
|
|
|
|
end)
|
|
|
|
end
|
|
|
|
|
2018-05-26 00:51:28 +00:00
|
|
|
test "true and false aliases" do
|
|
|
|
assert RDF.true == RDF.Boolean.new(true)
|
|
|
|
assert RDF.false == RDF.Boolean.new(false)
|
|
|
|
end
|
2016-10-15 16:26:56 +00:00
|
|
|
end
|