pricefeed

package
v0.3.0-dev2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: AGPL-3.0 Imports: 5 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 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.

Jump to

Keyboard shortcuts

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