Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Crown421 committed Apr 14, 2023
1 parent b1f66ba commit 25f5c82
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,14 @@ end
end
@testset "FitMvNormal" begin
@test value(FitMvNormal(2)) == (zeros(2), Matrix(I, 2, 2))
a, b = mergevals(FitMvNormal(2), OnlineStatsBase.eachrow([y y2]), OnlineStatsBase.eachrow([y2 y]))
@test a[1] b[1]
@test a[2] b[2]
a, b = mergestats(FitMvNormal(2), OnlineStatsBase.eachrow([y y2]), OnlineStatsBase.eachrow([y2 y]))
@test value(a)[1] value(b)[1]
@test value(a)[2] value(b)[2]

@test all(mean(a) .≈ mean(ys))
@test all(var(a) .≈ var(ys))
@test cov(a)[1] cov(a)[4] var(ys)
@test cov(a)[2] cov(a)[3]
end
end
#-----------------------------------------------------------------------# FastNode
Expand Down

0 comments on commit 25f5c82

Please sign in to comment.