scenjsonparse

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsStar

func IsStar(obj oj.OJsonObject) bool

IsStar returns whether check object is othe form "*".

Types

type Parser

type Parser struct {
	ExprInterpreter                  ei.ExprInterpreter
	AllowDctTxLegacySyntax           bool
	AllowDctLegacySetSyntax          bool
	AllowDctLegacyCheckSyntax        bool
	AllowSingleValueInCheckValueList bool
}

Parser performs parsing of both json tests (older) and scenarios (new).

func NewParser

func NewParser(fileResolver fr.FileResolver, vmType []byte) Parser

NewParser provides a new Parser instance.

func (*Parser) ParseScenarioFile

func (p *Parser) ParseScenarioFile(jsonString []byte) (*scenmodel.Scenario, error)

ParseScenarioFile converts a scenario json string to scenario object representation

func (*Parser) ParseScenarioStep

func (p *Parser) ParseScenarioStep(jsonSnippet string) (scenmodel.Step, error)

ParseScenarioStep parses a single scenario step, instead of an entire file. Handy for tests, where step snippets can be embedded in code.

Jump to

Keyboard shortcuts

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