testutil

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareUnorderedStringSlice

func CompareUnorderedStringSlice(a []string, b []string) bool

CompareUnorderedStringSlice compare two string slices. If a and b is exactly the same except the order, it returns true. In otherwise return false.

func DatumEqual

func DatumEqual(t testing.TB, expected, actual types.Datum, msgAndArgs ...interface{})

DatumEqual verifies that the actual value is equal to the expected value. For string datum, they are compared by the binary collation.

func HandleEqual

func HandleEqual(t testing.TB, expected, actual kv.Handle, msgAndArgs ...interface{})

HandleEqual verifies that the actual handle is equal to the expected handle.

func MaskSortHandles

func MaskSortHandles(handles []int64, shardBitsCount int, fieldType byte) []int64

MaskSortHandles sorts the handles by lowest (fieldTypeBits - 1 - shardBitsCount) bits.

func MustNewCommonHandle

func MustNewCommonHandle(t *testing.T, values ...interface{}) kv.Handle

MustNewCommonHandle create a common handle with given values.

func RandStringRunes

func RandStringRunes(n int) string

RandStringRunes generate random string of length n.

Types

This section is empty.

Jump to

Keyboard shortcuts

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