diff --git a/test/arrayops.jl b/test/arrayops.jl index 5280484c95faf..2df9c599ced99 100644 --- a/test/arrayops.jl +++ b/test/arrayops.jl @@ -1556,8 +1556,8 @@ copy!(S, A) @test cumsum(A, 1) == cumsum(B, 1) == cumsum(S, 1) @test cumsum(A, 2) == cumsum(B, 2) == cumsum(S, 2) -@test mapslices(v->sort(v), A, 1) == mapslices(v->sort(v), B, 1) == mapslices(v->sort(v), S, 1) -@test mapslices(v->sort(v), A, 2) == mapslices(v->sort(v), B, 2) == mapslices(v->sort(v), S, 2) +@test mapslices(sort, A, 1) == mapslices(sort, B, 1) == mapslices(sort, S, 1) +@test mapslices(sort, A, 2) == mapslices(sort, B, 2) == mapslices(sort, S, 2) @test flipdim(A, 1) == flipdim(B, 1) == flipdim(S, 2) @test flipdim(A, 2) == flipdim(B, 2) == flipdim(S, 2) diff --git a/test/functional.jl b/test/functional.jl index 5ed8f3ce51db8..1c9a68d6430ab 100644 --- a/test/functional.jl +++ b/test/functional.jl @@ -10,8 +10,8 @@ let a = [1.0, 2.0] @test isequal(a, sin([1.0, 2.0])) end # map -- ranges.jl -@test isequal(map(i->sqrt(i), 1:5), [sqrt(i) for i in 1:5]) -@test isequal(map(i->sqrt(i), 2:6), [sqrt(i) for i in 2:6]) +@test isequal(map(sqrt, 1:5), [sqrt(i) for i in 1:5]) +@test isequal(map(sqrt, 2:6), [sqrt(i) for i in 2:6]) # map on ranges should evaluate first value only once (#4453) let io=IOBuffer(3) diff --git a/test/offsetarray.jl b/test/offsetarray.jl index 2136e4dd580e0..7731895896f91 100644 --- a/test/offsetarray.jl +++ b/test/offsetarray.jl @@ -308,8 +308,8 @@ v = OffsetArray(rand(8), (-2,)) @test sort(A, 1) == OffsetArray(sort(parent(A), 1), A.offsets) @test sort(A, 2) == OffsetArray(sort(parent(A), 2), A.offsets) -@test mapslices(v->sort(v), A, 1) == OffsetArray(mapslices(v->sort(v), parent(A), 1), A.offsets) -@test mapslices(v->sort(v), A, 2) == OffsetArray(mapslices(v->sort(v), parent(A), 2), A.offsets) +@test mapslices(sort, A, 1) == OffsetArray(mapslices(sort, parent(A), 1), A.offsets) +@test mapslices(sort, A, 2) == OffsetArray(mapslices(sort, parent(A), 2), A.offsets) @test rotl90(A) == OffsetArray(rotl90(parent(A)), A.offsets[[2,1]]) @test rotr90(A) == OffsetArray(rotr90(parent(A)), A.offsets[[2,1]]) diff --git a/test/parallel_exec.jl b/test/parallel_exec.jl index a5be3fa85915d..37f58388b55c0 100644 --- a/test/parallel_exec.jl +++ b/test/parallel_exec.jl @@ -991,7 +991,7 @@ end # issue #15406 v15406 = remotecall_wait(() -> 1, id_other) fetch(v15406) -remotecall_wait(t -> fetch(t), id_other, v15406) +remotecall_wait(fetch, id_other, v15406) # Test various forms of remotecall* invocations diff --git a/test/reduce.jl b/test/reduce.jl index 4edf431e14966..a86b602dd2b86 100644 --- a/test/reduce.jl +++ b/test/reduce.jl @@ -160,8 +160,8 @@ prod2(itr) = invoke(prod, Tuple{Any}, itr) @test maxabs([1, -2, 3, -4]) == 4 @test minabs([-1, 2, -3, 4]) == 1 -@test maximum(x->abs2(x), 3:7) == 49 -@test minimum(x->abs2(x), 3:7) == 9 +@test maximum(abs2, 3:7) == 49 +@test minimum(abs2, 3:7) == 9 @test maximum(Int16[1]) === Int16(1) @test maximum(collect(Int16(1):Int16(100))) === Int16(100) diff --git a/test/reflection.jl b/test/reflection.jl index cd8e7d702245e..35bd8ddc831c3 100644 --- a/test/reflection.jl +++ b/test/reflection.jl @@ -43,7 +43,7 @@ test_code_reflections(test_bin_reflection, code_native) mktemp() do f, io OLDSTDOUT = STDOUT redirect_stdout(io) - @test try @code_native map(y->abs(y), rand(3)); true; catch false; end + @test try @code_native map(abs, rand(3)); true; catch false; end redirect_stdout(OLDSTDOUT) end diff --git a/test/runtests.jl b/test/runtests.jl index 4d91b652b1aac..90505c41d2400 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -41,7 +41,7 @@ cd(dirname(@__FILE__)) do test = shift!(tests) local resp try - resp = remotecall_fetch(t -> runtests(t), p, test) + resp = remotecall_fetch(runtests, p, test) catch e resp = e end