Skip to content

Commit

Permalink
Drop support under Julia v1.6 (#220)
Browse files Browse the repository at this point in the history
* drop support under Julia v1.6

* remove unsupported compat table

* remove unsupported compat table
  • Loading branch information
hyrodium authored Jan 28, 2022
1 parent af3a04a commit 4f76c5a
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
version:
- '1.0'
- '1.6'
- '1'
os:
- ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
Quaternions = "0.4"
StaticArrays = "0.10, 0.11, 0.12, 1.0"
julia = "0.7, 1"
StaticArrays = "1.2.12"
julia = "1.6"

[extras]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Expand Down
6 changes: 2 additions & 4 deletions test/2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,8 @@ using Unitful
for i = 1:repeats
r = rand(R)
@test norm(r) norm(Matrix(r))
if VERSION v"1.5"
@test normalize(r) normalize(Matrix(r))
@test normalize(r) isa SMatrix
end
@test normalize(r) normalize(Matrix(r))
@test normalize(r) isa SMatrix
end
end
end
Expand Down
14 changes: 6 additions & 8 deletions test/eigen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@test norm(v3) 1
@test E.values == λs
@test E.vectors == vs
if !(T in oneaxis_types) && VERSION v"1.2"
if !(T in oneaxis_types)
# If the rotation angle is in [0°, 180°], then the eigvals will be equal.
# Note that the randomized RotX (and etc.) have rotation angle in [0°, 360°].
# This needs Julia(≥1.2) to get sorted eigenvalues in a canonical order
Expand All @@ -46,12 +46,10 @@ end
@test norm(v2) 1
@test E.values == λs
@test E.vectors == vs
if VERSION v"1.2"
# If the rotation angle θ is in [0°, 180°], then the eigvals will be equal.
# Note that the randomized RotX (and etc.) have rotation angle in [0°, 360°].
# This needs Julia(≥1.2) to get sorted eigenvalues in a canonical order
# See https://github.com/JuliaLang/julia/pull/21598
@test eigvals(R) eigvals(collect(R))
end
# If the rotation angle θ is in [0°, 180°], then the eigvals will be equal.
# Note that the randomized RotX (and etc.) have rotation angle in [0°, 360°].
# This needs Julia(≥1.2) to get sorted eigenvalues in a canonical order
# See https://github.com/JuliaLang/julia/pull/21598
@test eigvals(R) eigvals(collect(R))
end
end
6 changes: 1 addition & 5 deletions test/rotation_generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,7 @@
r = zero(RotMatrixGenerator{2})
show(io, MIME("text/plain"), r)
str = String(take!(io))
if VERSION v"1.6"
@test startswith(str, "2×2 RotMatrixGenerator2{Float64}")
else
@test startswith(str, "2×2 RotMatrixGenerator{2,Float64,4}")
end
@test startswith(str, "2×2 RotMatrixGenerator2{Float64}")

rvec = RotationVecGenerator(1.0, 2.0, 3.0)
show(io, MIME("text/plain"), rvec)
Expand Down
12 changes: 3 additions & 9 deletions test/rotation_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,8 @@ all_types = (RotMatrix{3}, AngleAxis, RotationVec,
for i = 1:repeats
r = rand(R)
@test norm(r) norm(Matrix(r))
if VERSION v"1.5"
@test normalize(r) normalize(Matrix(r))
@test normalize(r) isa SMatrix
end
@test normalize(r) normalize(Matrix(r))
@test normalize(r) isa SMatrix
end
end
end
Expand Down Expand Up @@ -464,11 +462,7 @@ all_types = (RotMatrix{3}, AngleAxis, RotationVec,
r = rand(RotMatrix{2})
show(io, MIME("text/plain"), r)
str = String(take!(io))
if VERSION v"1.6"
@test startswith(str, "2×2 RotMatrix2{Float64}")
else
@test startswith(str, "2×2 RotMatrix{2,Float64,4}")
end
@test startswith(str, "2×2 RotMatrix2{Float64}")

rxyz = RotXYZ(1.0, 2.0, 3.0)
show(io, MIME("text/plain"), rxyz)
Expand Down
4 changes: 0 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import Unitful

import Random

if VERSION < v"1.2.0"
Base.:<(x) = Base.Fix2(<, x)
end

# Check that there are no ambiguities beyond those present in StaticArrays
ramb = detect_ambiguities(Rotations, Base, Core)
samb = detect_ambiguities(StaticArrays, Base, Core)
Expand Down

0 comments on commit 4f76c5a

Please sign in to comment.