unit

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(a dvm.Variable, b dvm.Variable) bool

Equal compare if 2 dvm.Variable are same

func GenerateExampleJSON

func GenerateExampleJSON()

GenerateExampleJSON epxort an example JSON file

func GenerateJSON

func GenerateJSON(name string, functions map[string]dvm.Function)

GenerateJSON generate a test file in the current folder based on the source loaded in memory

Types

type Execution_tests

type Execution_tests struct {
	Version   string     `json`
	Functions []Function `json`
}

type ExpectedState

type ExpectedState struct {
	Key   dvm.Variable
	Value dvm.Variable
}

type Function

type Function struct {
	Entrypoint     string          `json`
	Params         []dvm.Variable  `json:",omitempty"`
	ExpectedResult dvm.Variable    `json:`
	ExpectedStates []ExpectedState `json:",omitempty"`
	Description    string          `json`
}

func LoadFromJSON

func LoadFromJSON(jsonFile string) []Function

LoadFromJSON list of functions to test from a JSON file.

Jump to

Keyboard shortcuts

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