Skip to content

Commit

Permalink
Fix tests for expansion length (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
zsoerenm authored Aug 26, 2022
1 parent 9acb514 commit e15c180
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
[compat]
DocStringExtensions = "0.6, 0.7, 0.8"
CoordinateTransformations = "0.5, 0.6"
Interpolations = "0.12, 0.13"
JuliennedArrays = "0.2"
Interpolations = "0.12, 0.13, 0.14"
JuliennedArrays = "0.2, 0.3"
RecipesBase = "1.0"
Rotations = "0.12, 0.13, 1.0"
StaticArrays = "0.12, 1.0"
Expand Down
8 changes: 6 additions & 2 deletions test/real_manifold.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ end
@test lut_expanded[i,13,3:12] == circshift(lut_expanded[i,11,3:12], 5)
end

@test PhasedArray.calc_expansion_length(Constant) == 0
@test PhasedArray.calc_expansion_length(Constant) == 0
@test PhasedArray.calc_expansion_length(Constant) == 1
@test PhasedArray.calc_expansion_length(Constant) == 1
@test PhasedArray.calc_expansion_length(Quadratic) == 18
end

Expand All @@ -48,6 +48,10 @@ end
@test @inferred(get_steer_vec(manifold, Spherical(1,0,0), RotXYZ(0.0,0.0/2))) [1im, 1im, -1im, -1im]
@test @inferred(get_steer_vec(manifold, SVector(1,0,0), RotXYZ(0.0,0.0/2))) [1im, 1im, -1im, -1im]

# This errored before:
doa = SVector(0.25394112649966244, -9.029703527250079e-6, 0.9672196773176954)
@test @inferred(get_steer_vec(manifold, doa)) [0.9184897712563223 + 0.3954447370967388im, 0.9184897712563223 - 0.3954447370967388im, 0.9184897712563223 + 0.3954447370967388im, 0.9184897712563223 - 0.3954447370967388im]

manifold = @inferred RealManifold(lut[1], lut[2], lut[3], lut[4], max_elevation = π / 2)
@test typeof(manifold) <: AbstractManifold{4}
@test norm(@inferred(get_steer_vec(manifold, SVector(1, 1, 1)))) sqrt(num_ants)
Expand Down

2 comments on commit e15c180

@zsoerenm
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/67131

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.2 -m "<description of version>" e15c180e35614559383fd533a29da44343738cf6
git push origin v0.9.2

Please sign in to comment.