propchecker

package
v0.0.0-...-668de4a Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker struct {
	Properties   []Property                // List of Properties to be checked
	ImpVariables []string                  // Names of the Variables need to be tracked for Property Checking
	Stats        map[string]*PropertyStats // Statistics about the property executed
}

Checker stores the state required for checking the properties

func NewChecker

func NewChecker(property_file string) (*Checker, error)

NewChecker initailizes a new Checker

func (*Checker) Check

func (c *Checker) Check(context map[string]interface{}) (bool, *[]dara.FailedPropertyEvent, error)

Check checks proeprties under a provided context and returns list of property failures

func (*Checker) GetImportantVariables

func (c *Checker) GetImportantVariables() []string

GetImportantVariables returns the list of all variables that are being used by all the properties.

func (*Checker) GetPropertyStatistics

func (c *Checker) GetPropertyStatistics() map[string]*PropertyStats

GetPropertyStatistics returns the collected statistics about all the properties

type Property

type Property struct {
	Name      string     // Name of the property
	Variables []Variable // List of all variables used in this property
	PropObj   *eek.Eek
}

Property represents a property/go function that needs to be checked during execution

type PropertyStats

type PropertyStats struct {
	NumExecutions int
	NumFailures   int
}

PropertyStats collects statistics about a property

type Variable

type Variable struct {
	Name     string // Fully qualified package name of the variable
	PropName string // Name Used in the Property
	Type     string // Type of the Variable
}

Variable represents the variable mapping between the name of the variable in the context and the name of the variable in the Property

Jump to

Keyboard shortcuts

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