tests

package
v0.2103.11 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package tests contains helpers for testing MKVS trees.

Index

Constants

View Source
const (
	// OpInsert is the tree insert operation name.
	OpInsert = "Insert"
	// OpRemove is the tree remove operation name.
	OpRemove = "Remove"
	// OpGet is the tree get operation name.
	OpGet = "Get"
	// OpIteratorSeek is the tree iterator seek operation name.
	OpIteratorSeek = "IteratorSeek"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Op

type Op struct {
	// Op is the operation name.
	Op string `json:"op"`
	// Key is the key that is inserted, removed or looked up.
	Key []byte `json:"key"`
	// Value is the value that is inserted or that is expected for the given key during lookup.
	Value []byte `json:"value"`
	// ExpectedKey is the key that is expected for the given operation (e.g., iterator seek).
	ExpectedKey []byte `json:"expected_key"`
}

Op is a tree operation used in test vectors.

type TestVector

type TestVector []*Op

TestVector is a MKVS tree test vector (a series of tree operations).

Jump to

Keyboard shortcuts

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