Skip to content

Commit cb79e08

Browse files
committed
Return stray return and fix tests.
1 parent dd8c594 commit cb79e08

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/testsuite/mapreduce.jl

+4-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ function test_mapreduce(AT)
77
@test compare((A,R)->Base.mapreducedim!(identity, +, R, A), AT, rand(range, sz), zeros(ET, red))
88
@test compare((A,R)->Base.mapreducedim!(identity, *, R, A), AT, rand(range, sz), ones(ET, red))
99
@test compare((A,R)->Base.mapreducedim!(x->x+x, +, R, A), AT, rand(range, sz), zeros(ET, red))
10-
return
1110
end
1211

1312
# implicit singleton dimensions
@@ -141,14 +140,14 @@ function test_mapreduce(AT)
141140
@test compare(x->mapreduce(_addone, +, x; dims = 2, init = _zero),
142141
AT, rand(range, N, N))
143142

144-
@test compare(x->mapreduce(+, +, x; dims = 2),
143+
@test compare((x,y)->mapreduce(+, +, x, y; dims = 2),
144+
AT, rand(range, N, N), rand(range, N, N))
145+
@test compare((x,y)->mapreduce(+, +, x, y; dims = 2, init = _zero),
145146
AT, rand(range, N, N), rand(range, N, N))
146-
@test compare(x->mapreduce(+, +, x; dims = 2, init = _zero),
147-
AT, rand(range, N, N). rand(range, N, N))
148147
end
149148
end
150149
@testset "sum maximum minimum prod" begin
151-
for dims in ((4048,), (1024,1024), (77,), (1923,209))
150+
for dims in ((4048,), (77,), (1923,209))
152151
@test compare(sum, AT, rand(range, dims))
153152
@test compare(prod, AT, rand(range, dims))
154153
@test compare(x -> sum(abs, x), AT, rand(range, dims))

0 commit comments

Comments
 (0)