testing

package
v0.0.0-...-a108baa Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectPaths

func CollectPaths(typ reflect.Type, prefix []int) [][]int

CollectPaths walks over the struct type (recursively) and returns a slice of index paths. Each path points to exactly one (exported) sub-field.

func MakeAccountData

func MakeAccountData(status basics.Status, algos basics.MicroAlgos) basics.AccountData

MakeAccountData returns a AccountData with non-empty voting fields for online accounts

func NearZeros

func NearZeros(t *testing.T, sample any) []any

NearZeros takes a sample in order to retrieve its type. It returns a slice of the same type in which each element of the slice is the same type as the sample, but exactly one field (or sub-field) is set to a non-zero value. It returns one example for every sub-field.

func OnlineAccountData

func OnlineAccountData(u basics.AccountData) basics.OnlineAccountData

OnlineAccountData converts basics.AccountData to basics.OnlineAccountData. Account is expected to be Online otherwise it is cleared out. This function is intended for testing purposes only.

Types

This section is empty.

Jump to

Keyboard shortcuts

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