pricefeed

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompactJsonString

func CompactJsonString(t *testing.T, jsonString string) string

func ErrorMapsEqual

func ErrorMapsEqual[K comparable](t *testing.T, expected, 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, 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

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