Documentation ¶
Overview ¶
Package golden provides tools for fixture testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type G ¶
type G struct { ShouldUpdate bool FixtureDir string FixturePrefix string FixtureSuffix string // contains filtered or unexported fields }
G is the object that assertions are made on.
func (G) Assert ¶
Assert asserts, that the given byte slice has the same content as a file, whose path is derived from the given name (usually "testdata/"+name+".golden").
func (G) AssertStruct ¶
AssertStruct asserts, that the given struct has the same content as a file, whose path is derived from the given name (usually "testdata/"+name+".golden"). This is ensured by gob-encoding the given struct and comparing it against the file's contents.
Click to show internal directories.
Click to hide internal directories.