package cmp
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/cmp"
Index ¶
- func Compare(l, r value.V) (int, error)
- func Equal(t *testing.T, expected, actual interface{})
- func NoError(t *testing.T, err error)
- func NotNil(t *testing.T, value interface{})
Functions ¶
func Compare ¶
Compare compares its operands. It returns -1, 0, 1 if l < r, l == r, l > r. Returns error if types are not comparable. Comparable types are all integer types, UUID, DyNumber, Float, Double, String, UTF8, Date, Datetime, Timestamp, Tuples and Lists. Primitive arguments are comparable if their types are the same. Optional types is comparable to underlying types, e.g. Optional<Optional<Float>> is comparable to Float. Null value is comparable to non-null value of the same types and is considered less than any non-null value. Tuples and Lists are comparable if their elements are comparable. Tuples and Lists are compared lexicographically. If tuples (lists) have different length and elements of the shorter tuple (list) are all equal to corresponding elements of the other tuple (list), than the shorter tuple (list) is considered less than the longer one.
func Equal ¶
func NoError ¶
func NotNil ¶
Source Files ¶
- Version
- v3.3.1
- Published
- Nov 7, 2021
- Platform
- js/wasm
- Imports
- 8 packages
- Last checked
- 2 minutes ago –
Tools for package owners.