Skip to content

Commit b903b9e

Browse files
committed
merge master
2 parents c32966c + d6b2d7d commit b903b9e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test_specific_domains.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
using StaticArrays, DomainSets, Test
22
import DomainSets: MappedDomain, similar_interval
33

4+
struct Basis3Vector <: StaticVector{3,Float64} end
5+
6+
Base.getindex(::Basis3Vector, k::Int) = k == 1 ? 1.0 : 0.0
7+
48
# TODO: StaticArrays has new syntax for this, e.g. SA[1,2,3]
59
const v = TypeFactory{SVector}()
610

@@ -621,6 +625,8 @@ end
621625
S2 = convert(Domain{SVector{3,BigFloat}}, S)
622626
@test eltype(S2) == SVector{3,BigFloat}
623627

628+
@test Basis3Vector() in S
629+
624630
S = 2UnitSphere() + v[1.,1.,1.]
625631
@test approx_in(v[1. + 2*cos(1.),1. + 2*sin(1.),1.], S)
626632
@test !approx_in(v[4.,1.,5.], S)

0 commit comments

Comments
 (0)