MCPcopy Create free account
hub / github.com/goadesign/goa / Compare

Method Compare

codegen/testutil/golden.go:128–131  ·  view source on GitHub ↗

Compare compares the actual content with the golden file content (legacy API) Deprecated: Use StringContent().Path().CompareContent() for the fluent API

(actual string, golden string)

Source from the content-addressed store, hash-verified

126//
127// Deprecated: Use StringContent().Path().CompareContent() for the fluent API
128func (g *GoldenFile) Compare(actual string, golden string) {
129 g.t.Helper()
130 g.StringContent(actual).Path(golden).CompareContent()
131}
132
133// CompareBytes is like Compare but works with byte slices (legacy API)
134func (g *GoldenFile) CompareBytes(actual []byte, golden string) {

Callers 1

TestGoldenFileFunction · 0.95

Calls 3

StringContentMethod · 0.95
CompareContentMethod · 0.80
PathMethod · 0.80

Tested by 1

TestGoldenFileFunction · 0.76