Skip to content

export SUnitRange #474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/StaticArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import LinearAlgebra: transpose, adjoint, dot, eigvals, eigen, lyap, tr,
end

export StaticScalar, StaticArray, StaticVector, StaticMatrix
export Scalar, SArray, SVector, SMatrix
export Scalar, SArray, SVector, SMatrix, SUnitRange
export MArray, MVector, MMatrix
export FieldVector
export SizedArray, SizedVector, SizedMatrix
Expand Down
20 changes: 10 additions & 10 deletions test/SUnitRange.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
@testset "SUnitRange" begin
@test length(StaticArrays.SUnitRange(1,3)) === 3
@test length(StaticArrays.SUnitRange(1,-10)) === 0
@test length(SUnitRange(1,3)) === 3
@test length(SUnitRange(1,-10)) === 0

@test_throws BoundsError StaticArrays.SUnitRange(2,4)[0]
@test StaticArrays.SUnitRange(2,4)[1] === 2
@test StaticArrays.SUnitRange(2,4)[2] === 3
@test StaticArrays.SUnitRange(2,4)[3] === 4
@test_throws BoundsError StaticArrays.SUnitRange(2,4)[4]
@test_throws BoundsError SUnitRange(2,4)[0]
@test SUnitRange(2,4)[1] === 2
@test SUnitRange(2,4)[2] === 3
@test SUnitRange(2,4)[3] === 4
@test_throws BoundsError SUnitRange(2,4)[4]

@test_throws Exception StaticArrays.SUnitRange{1, -1}()
@test_throws TypeError StaticArrays.SUnitRange{1, 1.5}()
@test_throws Exception SUnitRange{1, -1}()
@test_throws TypeError SUnitRange{1, 1.5}()

ur_str = sprint(show, StaticArrays.SUnitRange)
ur_str = sprint(show, SUnitRange)
@test ur_str == "SUnitRange"
end