Last active
November 30, 2021 17:39
-
-
Save dacr/b4f1ce071fcae9f5b7fa25dde3455bd2 to your computer and use it in GitHub Desktop.
julia unit testing / published by https://github.com/dacr/code-examples-manager #0488aa3e-d3cc-4124-b7d4-56ac0e804a15/b6943e5e8c6e3d708b9737792300688a9bdc2a78
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env julia | |
## summary : julia unit testing | |
## keywords : unit-tests, julia, script, @testable | |
## publish : gist | |
## authors : David Crosson | |
## license : none | |
## id : 0488aa3e-d3cc-4124-b7d4-56ac0e804a15 | |
## created-on : 2020-10-19T17:16:25Z | |
## managed-by : https://github.com/dacr/code-examples-manager | |
## execution : julia script (https://julialang.org/) - run as follow 'julia scriptname.jl' or directly thanks to the shebang | |
using Test | |
@test true | |
@test 3.141580 < pi < 3.141599 | |
@test pi ≈ 3.14159 atol=0.00001 | |
@test 0.1 + 0.2 ≈ 0.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment