Skip to content

Commit

Permalink
Update runtests.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreySarnoff authored Jun 16, 2021
1 parent c6f6e57 commit c7f6a55
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
using IrrationalConstants
using Test

@testset "IrrationalConstants.jl" begin
# Write your tests here.
@testset "k*pi" begin
@test isapprox(2*pi, twoπ)
@test isapprox(4*pi, fourπ)
@test isapprox(pi/2, halfπ)
@test isapprox(pi/4, quartπ)
end

@testset "k/pi" begin
@test isapprox(1/pi, invπ)
@test isapprox(2/pi, twoinvπ)
@test isapprox(4/pi, fourinvπ)
end

@testset "1/(k*pi)" begin
@test isapprox(1/(2pi), inv2π)
@test isapprox(1/(4pi), inv4π)
end

@testset "sqrt" begin
@test isapprox(sqrt(2), sqrt2)
@test isapprox(sqrt(3), sqrt3)
@test isapprox(sqrt(pi), sqrtπ)
@test isapprox(sqrt(2pi), sqrt2π)
@test isapprox(sqrt(4pi), sqrt4π)
@test isapprox(sqrt(pi/2), sqrthalfπ)
@test isapprox(sqrt(1/2), invsqrt2)
@test isapprox(sqrt(1/(2pi)), invsqrt2π)
end

@testset "log" begin
@test isapprox(log(1/2), loghalf)
@test isapprox(log(2), logtwo)
@test isapprox(log(pi), logπ)
@test isapprox(log(2pi), log2π)
@test isapprox(log(4pi), log4π)
end

2 comments on commit c7f6a55

@JeffreySarnoff
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register()

@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 created: JuliaRegistries/General/38919

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.0 -m "<description of version>" c7f6a5598e4231dd15625f49fe9a5157c8fb4c73
git push origin v0.1.0

Please sign in to comment.