Skip to content

Commit

Permalink
test domainhash
Browse files Browse the repository at this point in the history
  • Loading branch information
daanhb committed Feb 29, 2024
1 parent 2d5f111 commit 9d9bfa4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/test_canonical.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

struct MyDomain{T} <: Domain{T}
somefield::T
end

@testset "canonical domains" begin
d1 = 2..3.0

Expand Down Expand Up @@ -77,4 +82,9 @@
@test mapfrom_canonical(ctype, d, 2.5) == 2.5
@test mapto_canonical(ctype, d, 2.5) == 2.5
end

@testset "domainhash" begin
mydomain = MyDomain(2.0)
@test hash(mydomain) == DomainSets.domainhash(mydomain)
end
end

0 comments on commit 9d9bfa4

Please sign in to comment.