We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76448d6 commit 08ba374Copy full SHA for 08ba374
1 file changed
test/runtests.jl
@@ -2,7 +2,18 @@ using FixFunctionArgument
2
using Test
3
4
@testset "FixFunctionArgument.jl" begin
5
- # Write your tests here.
+ @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
14
+ @testset "basic" begin
15
+ @test sin(0.3) === @inferred Fix1(sin, 0.3)()
16
17
end
18
19
using Aqua: Aqua
0 commit comments