assert

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package assert provides assertion helpers for testing.

Index

Constants

View Source
const (
	// TimeComparisonDelta provides a sensible default when comparing datetimes in tests.
	TimeComparisonDelta time.Duration = 1 * time.Second
)

Variables

This section is empty.

Functions

func TimeAlmostEquals

func TimeAlmostEquals(t *testing.T, fieldName string, got, want time.Time, delta time.Duration)

TimeAlmostEquals checks whether two dates are almost equal.

This helper should be used in tests covering data insertion and retrieval.

func TimeEquals

func TimeEquals(t *testing.T, fieldName string, got, want time.Time)

TimeEquals checks whether two dates are equal.

This helper should be used in tests covering data retrieval.

Types

This section is empty.

Jump to

Keyboard shortcuts

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