Add forgotten equality tests for string literals
This commit is contained in:
parent
d838424478
commit
0b45e06cf3
1 changed files with 27 additions and 1 deletions
|
@ -59,6 +59,32 @@ defmodule RDF.EqualityTest do
|
|||
test "incomparability", do: assert_incomparable @incomparable_bnodes
|
||||
end
|
||||
|
||||
describe "RDF.String and RDF.LangString" do
|
||||
@term_equal_strings [
|
||||
{RDF.string("foo"), RDF.string("foo")},
|
||||
{RDF.lang_string("foo", language: "de"), RDF.lang_string("foo", language: "de")},
|
||||
]
|
||||
@term_unequal_strings [
|
||||
{RDF.string("foo"), RDF.string("bar")},
|
||||
{RDF.lang_string("foo", language: "de"), RDF.lang_string("bar", language: "de")},
|
||||
]
|
||||
@value_equal_strings [
|
||||
]
|
||||
@value_unequal_strings [
|
||||
]
|
||||
@incomparable_strings [
|
||||
{RDF.string("foo"), RDF.lang_string("foo", language: "de")},
|
||||
{RDF.lang_string("foo", language: "de"), RDF.string("foo")},
|
||||
{RDF.string("foo"), RDF.bnode("foo")},
|
||||
]
|
||||
|
||||
test "term equality", do: assert_term_equal @term_equal_strings
|
||||
test "term inequality", do: assert_term_unequal @term_unequal_strings
|
||||
test "value equality", do: assert_value_equal @value_equal_strings
|
||||
test "value inequality", do: assert_value_unequal @value_unequal_strings
|
||||
test "incomparability", do: assert_incomparable @incomparable_strings
|
||||
end
|
||||
|
||||
describe "RDF.Boolean" do
|
||||
@term_equal_booleans [
|
||||
{RDF.true, RDF.true},
|
||||
|
|
Loading…
Reference in a new issue