Skip to content

Commit 90b9366

Browse files
committed
Add tests.
1 parent bcf1b82 commit 90b9366

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/execution.jl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,3 +1059,24 @@ end
10591059
end
10601060

10611061
############################################################################################
1062+
1063+
@testset "contextual dispatch" begin
1064+
1065+
@test_throws ErrorException CUDA.saturate(1f0) # CUDA.jl#60
1066+
1067+
@test testf(a->broadcast(x->x^1.5, a), rand(Float32, 1)) # CUDA.jl#71
1068+
@test testf(a->broadcast(x->1.0^x, a), rand(Int, 1)) # CUDA.jl#76
1069+
@test testf(a->broadcast(x->x^4, a), rand(Float32, 1)) # CUDA.jl#171
1070+
1071+
@test argmax(cu([true false; false true])) == CartesianIndex(1, 1) # CUDA.jl#659
1072+
1073+
# CUDA.jl#42
1074+
@test testf([Complex(1f0,2f0)]) do a
1075+
b = sincos.(a)
1076+
s,c = first(collect(b))
1077+
(real(s), imag(s), real(c), imag(c))
1078+
end
1079+
1080+
end
1081+
1082+
############################################################################################

0 commit comments

Comments
 (0)