_example

command
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

This example program illustrates how to create a custom test suite based on the harness package. main.go contains the test suite glue while tests.go contains example tests.

The custom test suite adds a feature to give individual tests some data that can be overridden in the environment. When executed:

./example  -v
=== RUN   LogIt
--- PASS: LogIt (0.00s)
        tests.go:27: Got "something"
=== RUN   SkipIt
--- SKIP: SkipIt (0.00s)
        main.go:40: Missing "TEST_DATA_else" in environment.
PASS

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL