Documentation ¶
Index ¶
- Constants
- func AsInterfaceType(name string, kind common.CompositeKind) string
- func AssertEqualWithDiff(t *testing.T, expected, actual interface{})
- func ExpectCheckerErrors(t *testing.T, err error, len int) []error
- func ParseAndCheck(t *testing.T, code string) (*sema.Checker, error)
- func ParseAndCheckWithOptions(t *testing.T, code string, options ParseAndCheckOptions) (*sema.Checker, error)
- type OccurrenceMatcher
- type ParseAndCheckOptions
Constants ¶
View Source
const ImportedLocation = ast.StringLocation("imported")
ImportedLocation is used as the default location for imported programs in tests.
View Source
const TestLocation = ast.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 ¶
AssertEqualWithDiff asserts that two objects are equal.
If the objects are not equal, this function prints a human-readable diff.
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
type ParseAndCheckOptions ¶
Click to show internal directories.
Click to hide internal directories.