assert

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package assert decides whether a flow did what a case said it would, and says what was wrong when it did not.

It produces failures, never booleans. "The case failed" is not a useful thing to be told; "expect.body: want {…}, got {…}" is, and a matcher that only returned false would have thrown away the one thing the reader needs. Everything here is written to that end.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(c suite.Case, outcome runner.Outcome) []string

Check judges an outcome against a case, and returns every expectation that did not hold — not the first one.

Reporting them all is the point. A case that got the wrong body has probably also got the wrong variables, and telling the user about one, then about the next after they fix it, then about the third, turns one debugging session into three.

Types

This section is empty.

Jump to

Keyboard shortcuts

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