Skip to content

Commit

Permalink
Restore original tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcaixeta committed Oct 7, 2020
1 parent d673778 commit 89a8494
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/test_dists.jl
Expand Up @@ -360,10 +360,9 @@ end
Q = rand(T, length(x), length(x))
Q = Q * Q' # make sure Q is positive-definite
@test sqmahalanobis(x, y, Q) dot(x - y, Q * (x - y))
z = oneunit(eltype(Q))
@test eltype(sqmahalanobis(x, y, Q)) == typeof(z * (oneunit(eltype(x)) - oneunit(eltype(y))) * z)
@test eltype(sqmahalanobis(x, y, Q)) == T
@test mahalanobis(x, y, Q) == sqrt(sqmahalanobis(x, y, Q))
@test eltype(mahalanobis(x, y, Q)) == typeof(z * (oneunit(eltype(x)) - oneunit(eltype(y))) * z)
@test eltype(mahalanobis(x, y, Q)) == T
end
end #testset

Expand Down

0 comments on commit 89a8494

Please sign in to comment.