Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions test/testsuite/broadcasting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ function broadcasting(AT, eltypes)
@test compare(A -> A .* ET(10), AT, rand(ET, 40, 40))
@test compare((A, B) -> A .* B, AT, rand(ET, 40, 40), rand(ET, 40, 40))
@test compare((A, B) -> A .* B .+ ET(10), AT, rand(ET, 40, 40), rand(ET, 40, 40))

@testset "mismatched sizes" begin
a = AT(rand(ET, 10, 1))
b = AT(rand(ET, 3, 1))
@test_throws DimensionMismatch a + b
@test_throws DimensionMismatch b + a
@test_throws DimensionMismatch a .+ b
end
end

@testset "map! $ET" begin
Expand Down