-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed references to
Cint
in ArbComplex.jl (#64)
* removed references to `Cint`in ArbComplex.jl * removed redundant constructor for `ArbComplex` * code coverage tests
- Loading branch information
Showing
3 changed files
with
33 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
*.jl.cov | ||
*.jl.*.cov | ||
*.jl.mem | ||
*.jl.*.mem | ||
Manifest.toml | ||
settings.json | ||
deps/deps.jl |
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 |
---|---|---|
@@ -1,3 +1,20 @@ | ||
@testset "complex" begin | ||
@test (1 + im) / ArbNumerics.ArbComplex(1, 1) == 1 | ||
@testset "ArbComplex" begin | ||
|
||
@testset "complex" begin | ||
@test (1 + im) / ArbNumerics.ArbComplex(1, 1) == 1 | ||
end | ||
|
||
# issue 34 and similar Cint-related stuff | ||
@testset "ArbComplex constructors" begin | ||
@test_throws ErrorException ArbComplex(5.0, base = 3) | ||
@test_throws ErrorException ArbComplex(5.0,1.0, base = 3) | ||
@test ArbComplex(5, digits = 53) == ArbComplex{53}(5) | ||
@test ArbComplex(5, 0, digits = 53) == ArbComplex{53}(5, 0) | ||
@test ArbComplex{53}(1 + 2im) == 1 + 2im | ||
@test ArbComplex(Int32(-1)) == ArbComplex(-1.0) | ||
@test ArbComplex(Int32(-1), Int32(-2)) == ArbComplex(-1.0, -2.0) | ||
@test ArbComplex(typemax(Int32) + 1) == ArbComplex(float(typemax(Int32) + 1)) | ||
@test hash(ArbComplex(-2, -2)) isa UInt | ||
end | ||
|
||
end |