Skip to content

Commit 594c767

Browse files
committed
Also test the generic code path
1 parent f0d6da4 commit 594c767

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19"
3131
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
3232
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
3333
ReferenceTests = "324d217c-45ce-50fc-942e-d289b448e8cf"
34+
Tau = "c544e3c2-d3e5-5802-ac44-44683f340e4a"
3435
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
3536
TestImages = "5e47fb64-e119-507b-a336-dd2b206d9990"
3637

3738
[targets]
38-
test = ["EndpointRanges", "ImageIO", "ImageMagick", "LinearAlgebra", "ReferenceTests", "Test", "TestImages"]
39+
test = ["EndpointRanges", "ImageIO", "ImageMagick", "LinearAlgebra", "ReferenceTests", "Tau", "Test", "TestImages"]

test/warp.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using CoordinateTransformations, Rotations, TestImages, ImageCore, StaticArrays, OffsetArrays, Interpolations, LinearAlgebra
22
using EndpointRanges
3+
using Tau
34
using Test, ReferenceTests
45

56
include("twoints.jl")
@@ -470,6 +471,11 @@ NaN NaN NaN NaN NaN NaN NaN
470471
@test axes(imrotate(img_camera, pi/2)) == axes(img_camera)
471472
@test imrotate(imrotate(imrotate(imrotate(img_camera, pi/2), pi/2), pi/2), pi/2) img_camera
472473
@test imrotate(imrotate(img_camera, pi), pi) == img_camera
474+
# Also check a "generic" irrational (one that happens to be quite special)
475+
## First, check that this hits the generic code path (if we change that, pick a different irrational)
476+
@test ImageTransformations._mod2pi(τ) isa Float64
477+
## Now check that it gives the expected result
478+
@test imrotate(img_camera, τ) img_camera
473479
end
474480
end
475481
end

0 commit comments

Comments
 (0)