Skip to content

JuliaTesting/MetaTesting.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MetaTesting.jl

CI Coverage Code Style: Blue ColPrac: Contributor's Guide on Collaborative Practices for Community Packages

MetaTesting is a collection of utilities for testing "testers," functions that run tests. It is primarily intended as a test dependency.

Example

First we define a tester:

using Test

function test_approx(x, y)
    @test x  y
end

Then we test it using MetaTesting:

using MetaTesting

@testset begin
    # test that tester correctly passes
    test_approx(1.0, 1.0)

    # test that tester correctly fails
    @test fails() do
        test_approx(1.0, 2.0)  # args not approximately equal
    end

    # test that tester correctly errors
    @test errors() do
        test_approx(1.0, (2.0,))  # isapprox not defined for this pair of types
    end
end

About

Test the testers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 11

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy