Skip to content

Commit

Permalink
Eliminate full from test/math.jl and test/linalg/uniformscaling.jl.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sacha0 committed Sep 27, 2017
1 parent 6473693 commit c3d54ea
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
32 changes: 16 additions & 16 deletions test/linalg/uniformscaling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,43 +110,43 @@ let
else
T = LowerTriangular(view(randn(3,3), 1:3, 1:3))
end
@test @inferred(T + J) == full(T) + J
@test @inferred(J + T) == J + full(T)
@test @inferred(T - J) == full(T) - J
@test @inferred(J - T) == J - full(T)
@test @inferred(T + J) == Array(T) + J
@test @inferred(J + T) == J + Array(T)
@test @inferred(T - J) == Array(T) - J
@test @inferred(J - T) == J - Array(T)
@test @inferred(T\I) == inv(T)

if isa(A, Array)
T = LinAlg.UnitLowerTriangular(randn(3,3))
else
T = LinAlg.UnitLowerTriangular(view(randn(3,3), 1:3, 1:3))
end
@test @inferred(T + J) == full(T) + J
@test @inferred(J + T) == J + full(T)
@test @inferred(T - J) == full(T) - J
@test @inferred(J - T) == J - full(T)
@test @inferred(T + J) == Array(T) + J
@test @inferred(J + T) == J + Array(T)
@test @inferred(T - J) == Array(T) - J
@test @inferred(J - T) == J - Array(T)
@test @inferred(T\I) == inv(T)

if isa(A, Array)
T = UpperTriangular(randn(3,3))
else
T = UpperTriangular(view(randn(3,3), 1:3, 1:3))
end
@test @inferred(T + J) == full(T) + J
@test @inferred(J + T) == J + full(T)
@test @inferred(T - J) == full(T) - J
@test @inferred(J - T) == J - full(T)
@test @inferred(T + J) == Array(T) + J
@test @inferred(J + T) == J + Array(T)
@test @inferred(T - J) == Array(T) - J
@test @inferred(J - T) == J - Array(T)
@test @inferred(T\I) == inv(T)

if isa(A, Array)
T = LinAlg.UnitUpperTriangular(randn(3,3))
else
T = LinAlg.UnitUpperTriangular(view(randn(3,3), 1:3, 1:3))
end
@test @inferred(T + J) == full(T) + J
@test @inferred(J + T) == J + full(T)
@test @inferred(T - J) == full(T) - J
@test @inferred(J - T) == J - full(T)
@test @inferred(T + J) == Array(T) + J
@test @inferred(J + T) == J + Array(T)
@test @inferred(T - J) == Array(T) - J
@test @inferred(J - T) == J - Array(T)
@test @inferred(T\I) == inv(T)

@test @inferred(I\A) == A
Expand Down
10 changes: 5 additions & 5 deletions test/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ end
TAA = rand(2,2)
TAA = (TAA + TAA.')/2.
STAA = Symmetric(TAA)
@test full(atanh.(STAA)) == atanh.(TAA)
@test full(asinh.(STAA)) == asinh.(TAA)
@test full(acosh.(STAA+Symmetric(ones(TAA)))) == acosh.(TAA+ones(TAA))
@test full(acsch.(STAA+Symmetric(ones(TAA)))) == acsch.(TAA+ones(TAA))
@test full(acoth.(STAA+Symmetric(ones(TAA)))) == acoth.(TAA+ones(TAA))
@test Array(atanh.(STAA)) == atanh.(TAA)
@test Array(asinh.(STAA)) == asinh.(TAA)
@test Array(acosh.(STAA+Symmetric(ones(TAA)))) == acosh.(TAA+ones(TAA))
@test Array(acsch.(STAA+Symmetric(ones(TAA)))) == acsch.(TAA+ones(TAA))
@test Array(acoth.(STAA+Symmetric(ones(TAA)))) == acoth.(TAA+ones(TAA))
end

@testset "check exp2(::Integer) matches exp2(::Float)" begin
Expand Down

0 comments on commit c3d54ea

Please sign in to comment.