Documentation ¶
Overview ¶
Package test contains utility functions used throughout the project in tests
Index ¶
- func AssertBufferEquals(t *testing.T, buf, std []byte)
- func AssertDeepEquals(t *testing.T, res, std interface{})
- func AssertFileEquals(t *testing.T, path string, std []byte)
- func GenString(len int) string
- func LogUnexpected(t *testing.T, expected, got interface{})
- func ReadSample(t *testing.T, name string) []byte
- func UnexpectedError(t *testing.T, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertBufferEquals ¶
AssertBufferEquals asserts two buffers are equal
func AssertDeepEquals ¶
AssertDeepEquals asserts two values are deeply equal or fails the test, if not
func AssertFileEquals ¶
AssertFileEquals reads a file from disk and asserts it equals the standard buffer
func LogUnexpected ¶
LogUnexpected fails the test and prints the values in an `expected: X got: Y` format
func ReadSample ¶
ReadSample reads a sample file of passed file name
func UnexpectedError ¶
UnexpectedError fails the test with an unexpected error message
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.