Skip to content

Commit

Permalink
allocation tests only for Base.VERSION ≥ v"1.5"
Browse files Browse the repository at this point in the history
  • Loading branch information
cscherrer committed May 21, 2021
1 parent ac95cb1 commit fc8e56c
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,18 @@ end
@test @inferred g(beta=1, alpha=3) == 28
end

@testset "No Allocation" begin
@test 0 == @ballocated f(a=1, b=2, c=3)
@test 0 == @ballocated f((a=1, b=2, c=3))
@test 0 == @ballocated Foo((b=1,a=2))
@test 0 == @ballocated g(a=1, b=2)
@test 0 == @ballocated g((a=1, b=2))
@test 0 == @ballocated g(a=1, b=2, c=3)
@test 0 == @ballocated g((a=1, b=2, c=3))
@test 0 == @ballocated f(alpha=1,b=2,c=3)
@test 0 == @ballocated g(beta=1, alpha=3)
if Base.VERSION v"1.5"
@testset "No Allocation" begin
@test 0 == @ballocated f(a=1, b=2, c=3)
@test 0 == @ballocated f((a=1, b=2, c=3))
@test 0 == @ballocated Foo((b=1,a=2))
@test 0 == @ballocated g(a=1, b=2)
@test 0 == @ballocated g((a=1, b=2))
@test 0 == @ballocated g(a=1, b=2, c=3)
@test 0 == @ballocated g((a=1, b=2, c=3))
@test 0 == @ballocated f(alpha=1,b=2,c=3)
@test 0 == @ballocated g(beta=1, alpha=3)
end
end
end

Expand Down

2 comments on commit fc8e56c

@cscherrer
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/37087

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.5 -m "<description of version>" fc8e56c1159a0a343d7f4b31f906ff141a27e7ff
git push origin v0.1.5

Please sign in to comment.