common_utils

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ImportedLocation = common.StringLocation("imported")

ImportedLocation is used as the default location for imported programs in tests.

View Source
const TestLocation = common.StringLocation("test")

TestLocation is used as the default location for programs in tests.

Variables

This section is empty.

Functions

func AssertEqualWithDiff

func AssertEqualWithDiff(t *testing.T, expected, actual any)

AssertEqualWithDiff asserts that two objects are equal.

If the objects are not equal, this function prints a human-readable diff.

func RequireError

func RequireError(t *testing.T, err error)

RequireError is a wrapper around require.Error which also ensures that the error message, the secondary message (if any), and the error notes' (if any) messages can be successfully produced

Types

type GlobalTypeGetter added in v1.5.0

type GlobalTypeGetter interface {
	GetGlobalType(name string) (*sema.Variable, bool)
}

type Invokable added in v1.5.0

type Invokable interface {
	interpreter.ValueComparisonContext
	interpreter.InvocationContext
	interpreter.ResourceDestructionContext
	Invoke(functionName string, arguments ...interpreter.Value) (value interpreter.Value, err error)
	InvokeTransaction(arguments []interpreter.Value, signers ...interpreter.Value) error
	GetGlobal(name string) interpreter.Value

	GlobalTypeGetter
}

Jump to

Keyboard shortcuts

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