convey

package
v0.0.0-...-e7509a3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package convey provides a temporary symbol which converts a convey-style comparison of the type:

func(actual any, expected ...any) string

Into an truth compatible symbol:

comparison.Func[any]

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Adapt

func Adapt(oldComparison func(actual any, expected ...any) string) func(expected ...any) comparison.Func[any]

Adapt takes an old convey-style comparison function and converts it to a comparison.Func[any].

This is intended to be a temporary tool which should only be used during the transitional period where we switch away from Convey-style assertions. Code using this adapter should be rewritten to exclusively use truth/comparison.

Example

assert.That(t, actualValue, convey.Adapt(myCustomShouldFunction)(expected))

Types

This section is empty.

Directories

Path Synopsis
Package facade is a transitional package that mimics the API of GoConvey classic.
Package facade is a transitional package that mimics the API of GoConvey classic.

Jump to

Keyboard shortcuts

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