package hqt
import "github.com/gohugoio/hugo/htesting/hqt"
Index ¶
Variables ¶
IsAllElementsEqual asserts that all elements in the slice are equal.
var IsSameFloat64 = qt.CmpEquals(cmp.Comparer(func(a, b float64) bool { return math.Abs(a-b) < 0.0001 }))
IsSameFloat64 asserts that two float64 values are equal within a small delta.
IsSameString asserts that two strings are equal. The two strings are normalized (whitespace removed) before doing a ==. Also note that two strings can be the same even if they're of different types.
IsSameType asserts that got is the same type as want.
Functions ¶
func DeepAllowUnexported ¶
DeepAllowUnexported creates an option to allow compare of unexported types in the given list of types. see https://github.com/google/go-cmp/issues/40#issuecomment-328615283
Source Files ¶
- Version
- v0.144.2 (latest)
- Published
- Feb 19, 2025
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 13 hours ago –
Tools for package owners.