keelassert

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 7 Imported by: 0 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

Package keelassert provides inline snapshot assertions in the style of github.com/stretchr/testify/assert, see keeltest.Inline. Failed assertions mark the test as failed and continue.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InlineEqual

func InlineEqual(t *testing.T, actual any, msgAndArgs ...any) bool

InlineEqual compares the %v formatting of actual with the value stored as an INLINE comment on the calling line, see keeltest.Inline. A missing value is written and the test is marked as failed. It reports whether the values are equal.

func InlineJSONEq

func InlineJSONEq(t *testing.T, actual any, msgAndArgs ...any) bool

InlineJSONEq compares the JSON encoding of actual with the JSON stored as an INLINE comment on the calling line, ignoring formatting, see keeltest.Inline. A missing value is written and the test is marked as failed. It reports whether the values are equal.

Types

type Assertions

type Assertions struct {
	// contains filtered or unexported fields
}

Assertions provides the package's inline assertions bound to a testing.T.

func New

func New(t *testing.T) *Assertions

New returns Assertions for t.

func (*Assertions) InlineEqual

func (a *Assertions) InlineEqual(actual any, msgAndArgs ...any) bool

InlineEqual is like the package level InlineEqual.

func (*Assertions) InlineJSONEq

func (a *Assertions) InlineJSONEq(actual any, msgAndArgs ...any) bool

InlineJSONEq is like the package level InlineJSONEq.

Jump to

Keyboard shortcuts

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