Skip to content

Commit

Permalink
add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
MasonProtter committed Jan 29, 2024
1 parent 02c39c2 commit 590e058
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using Test, ThreadsBasics

@testset "Basics" begin
for (~, f, op, itr) [
(isapprox, sin, +, rand(ComplexF64, 100)),
(isapprox, sin, +, rand(ComplexF64, 10, 10)),
(isapprox, cos, max, 1:100000),
(==, round, vcat, randn(1000)),
(==, last, *, [1=>"a", 2=>"b", 3=>"c", 4=>"d", 5=>"e"])
Expand All @@ -25,6 +25,10 @@ using Test, ThreadsBasics
@test all(tmap(f, Any, itr; kwargs...) .~ map_f_itr)
@test all(tcollect(Any, (f(x) for x in itr); kwargs...) .~ map_f_itr)
@test all(tcollect(Any, f.(itr); kwargs...) .~ map_f_itr)

@test tmap(f, itr; kwargs...) ~ map_f_itr
@test tcollect((f(x) for x in itr); kwargs...) ~ map_f_itr
@test tcollect(f.(itr); kwargs...) ~ map_f_itr

RT = Core.Compiler.return_type(f, Tuple{eltype(itr)})

Expand Down

0 comments on commit 590e058

Please sign in to comment.