Skip to content

Commit

Permalink
Add type assert in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
wsshin committed Jul 27, 2017
1 parent b3c5130 commit 43b8bfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ using StaticArrays, Base.Test

@testset "diagm()" begin
@test @inferred(diagm(SVector(1,2))) === @SMatrix [1 0; 0 2]
@test @inferred(diagm(SVector(1,2,3), Val{2})) == diagm([1,2,3], 2)
@test @inferred(diagm(SVector(1,2,3), Val{-2})) == diagm([1,2,3], -2)
@test @inferred(diagm(SVector(1,2,3), Val{2}))::SMatrix == diagm([1,2,3], 2)
@test @inferred(diagm(SVector(1,2,3), Val{-2}))::SMatrix == diagm([1,2,3], -2)
end

@testset "diag()" begin
Expand Down

0 comments on commit 43b8bfa

Please sign in to comment.