MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / Equal

Function Equal

internal/testing/cmp/cmp.go:57–59  ·  view source on GitHub ↗

Equal succeeds if x == y, the same as [gotest.tools/v3/assert.Equal]. The type constraint makes it easier to compare against numeric literals and typed constants.

(x, y T)

Source from the content-addressed store, hash-verified

55// Equal succeeds if x == y, the same as [gotest.tools/v3/assert.Equal].
56// The type constraint makes it easier to compare against numeric literals and typed constants.
57func Equal[T any](x, y T) Comparison {
58 return gotest.Equal(x, y)
59}
60
61// Len succeeds if actual has the expected length.
62func Len[Slice ~[]E, E any](actual Slice, expected int) Comparison {

Callers 4

TestSanitizeLogDirectoryFunction · 0.92
TestAdditionalVolumesFunction · 0.92
controller_test.goFile · 0.85

Calls 1

EqualMethod · 0.45

Tested by 3

TestSanitizeLogDirectoryFunction · 0.74
TestAdditionalVolumesFunction · 0.74