Documentation ¶
Index ¶
- func ErrorMapsEqual[K comparable](t *testing.T, expected map[K]error, actual map[K]error)
- func ErrorsEqual(t *testing.T, expected []error, actual []error)
- func MarketParamErrorsEqual(t *testing.T, expectedMarketParamErrors map[uint32]error, ...)
- func ReadJsonTestFile(t *testing.T, fileName string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorMapsEqual ¶
func ErrorMapsEqual[K comparable](t *testing.T, expected map[K]error, actual map[K]error)
ErrorMapsEqual is a testing method that takes any two maps of keys to errors and asserts that they have the same sets of keys, and that each associated error value has the same rendered message.
func ErrorsEqual ¶
ErrorsEqual is a testing method that takes any two slices of errors and asserts that each actual error has the same rendered message as the expected error.
func MarketParamErrorsEqual ¶ added in v0.4.0
func MarketParamErrorsEqual( t *testing.T, expectedMarketParamErrors map[uint32]error, actualMarketParamErrors map[uint32]error, )
MarketParamErrorsEqual is a testing method that takes any two maps of market ids to errors and asserts that they have the same sets of keys, and that each associated error value has the same rendered message
func ReadJsonTestFile ¶
ReadJsonTestFile takes a test file with human-readable, formatted JSON, load it, and compacts it. The purpose is to remove the formatting (e.g. newlines, tabs, etc) and return a string that would match an unmarshaled object string generated by a Go program natively.
Types ¶
This section is empty.