Skip to content

Commit 76a5b64

Browse files
authored
Add tests (#820)
1 parent 8a97d00 commit 76a5b64

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/cov.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ end
290290

291291
x = rand(8)
292292
y = rand(8)
293+
wv = fweights(rand(8))
293294
X = hcat(x, y)
294295

295296
for corrected (false, true)
@@ -298,6 +299,7 @@ end
298299
@test cov(scc, x) cov(x; corrected=corrected)
299300
@test cov(scc, x, y) cov(x, y; corrected=corrected)
300301
@test cov(scc, X) cov(X; corrected=corrected)
302+
@test cov(scc, X, wv) cov(X, wv; corrected=corrected)
301303

302304
@test var(scc, x) var(x; corrected=corrected)
303305
@test std(scc, x) std(x; corrected=corrected)
@@ -307,6 +309,7 @@ end
307309
# it into a correlation matrix.
308310
@test cor(scc, x, y) cor(x, y)
309311
@test cor(scc, X) cor(X)
312+
@test cor(scc, X, wv) cor(X, wv)
310313
end
311314
end
312315
end # @testset "StatsBase.Covariance"

0 commit comments

Comments
 (0)