pricefeed

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

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

func ErrorsEqual(t *testing.T, expected []error, actual []error)

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

func ReadJsonTestFile(t *testing.T, fileName string) string

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL