utils

package
v0.12.12 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 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 AsInterfaceType added in v0.2.0

func AsInterfaceType(name string, kind common.CompositeKind) string

func AssertEqualWithDiff

func AssertEqualWithDiff(t *testing.T, expected, actual interface{})

AssertEqualWithDiff asserts that two objects are equal.

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

func DeploymentTransaction added in v0.5.0

func DeploymentTransaction(name string, contract []byte) []byte

func RemovalTransaction added in v0.10.5

func RemovalTransaction(name string) []byte

func RequireErrorAs added in v0.9.3

func RequireErrorAs(t *testing.T, err error, target interface{})

TODO: switch to require.ErrorAs once released: https://github.com/stretchr/testify/commit/95a9d909e98735cd8211dfc5cbbb6b8b0b665915

func UpdateTransaction added in v0.10.1

func UpdateTransaction(name string, contract []byte) []byte

Types

type OccurrenceMatcher

type OccurrenceMatcher struct {
	StartPos        sema.Position
	EndPos          sema.Position
	OriginStartPos  *sema.Position
	OriginEndPos    *sema.Position
	DeclarationKind common.DeclarationKind
}

func (*OccurrenceMatcher) Match

func (matcher *OccurrenceMatcher) Match(actual interface{}) bool

Jump to

Keyboard shortcuts

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