Skip to content

Commit 08ba374

Browse files
committed
test: add some
1 parent 76448d6 commit 08ba374

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

test/runtests.jl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@ using FixFunctionArgument
22
using Test
33

44
@testset "FixFunctionArgument.jl" begin
5-
# Write your tests here.
5+
@testset "zero-cost abstraction for type arguments" begin
6+
@test (iszero sizeof Fix1)(convert, Float32)
7+
@test (iszero sizeof Fix2)(typeassert, Float32)
8+
@test (iszero sizeof Fix1)(Int, nothing) # a call would throw, but that is not the point
9+
end
10+
@testset "`Fix1`, `Fix2`" begin
11+
@test Fix1 === Fix{1}
12+
@test Fix2 === Fix{2}
13+
end
14+
@testset "basic" begin
15+
@test sin(0.3) === @inferred Fix1(sin, 0.3)()
16+
end
617
end
718

819
using Aqua: Aqua

0 commit comments

Comments
 (0)