Skip to content

Commit d2c064e

Browse files
kshyattandyferris
authored andcommitted
Add tests for randn! and randexp! (#189)
1 parent 5c0715d commit d2c064e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/MArray.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@
5757
@test isa(@MArray(rand(2,2,1)), MArray{Tuple{2,2,1}, Float64})
5858
@test isa(@MArray(randn(2,2,1)), MArray{Tuple{2,2,1}, Float64})
5959
@test isa(@MArray(randexp(2,2,1)), MArray{Tuple{2,2,1}, Float64})
60+
61+
@test isa(randn!(@MArray zeros(2,2,1)), MArray{Tuple{2,2,1}, Float64})
62+
@test isa(randexp!(@MArray zeros(2,2,1)), MArray{Tuple{2,2,1}, Float64})
6063

6164
@test ((@MArray zeros(Float32, 2, 2, 1))::MArray{Tuple{2,2,1},Float32}).data === (0.0f0, 0.0f0, 0.0f0, 0.0f0)
6265
@test ((@MArray ones(Float32, 2, 2, 1))::MArray{Tuple{2,2,1},Float32}).data === (1.0f0, 1.0f0, 1.0f0, 1.0f0)

0 commit comments

Comments
 (0)