Skip to content
This repository was archived by the owner on Aug 22, 2017. It is now read-only.

Latest commit

History

History
28 lines (21 loc) 路 1.41 KB

File metadata and controls

28 lines (21 loc) 路 1.41 KB

馃懟 requirement

GoDoc Build Status Go Report Card License codecov

requirement provides support for requirement to be able to skip some tests depending on the environment. It is intended to work at lesat with the built-in testing framework. But any testing framework that defines a Skip(args ...interface{}) method can be used.

To write a test with a requirement, you need import this library and call it like the following

    func TestWithRequirement(t *testing.T) {
        requirement.Is(t, func() bool {
            return false
        })
    }

This will print requirement.go:51: requirement_test.go:56: unmatched requirement TestWithRequirement.func1

Provided requirement

A few requirement are also provided by this library. They are all based on the built-in libraries.

  • runtime with ArchitectureIs, OperatingSystemIs and GoVersionIs.