-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in lenses and add simplistic tests
- Loading branch information
1 parent
6c47e9b
commit 1db518d
Showing
3 changed files
with
19 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@testset "Test ideal lens" begin | ||
|
||
arr = randn((10, 10)) | ||
@test all(abs.(lens(10.0, 12.0, size(arr), radius=1000)) .≈ 1) | ||
|
||
arr2 = zeros(size(arr)) | ||
arr2[6, 6] = 1 | ||
@test arr2 ≈ abs.(lens(10.0, 12.0, size(arr), radius=0)) | ||
|
||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters