ScriptTest class final

A sample run of a ScriptDef and what it should give (the editor's test console): args by parameter, sample vars and input nodes values, and the result expected, or the error expectError (its type, its message, or Type: message).

In JSON args is a map by parameter name, or a list in parameter order (as script.name(...) and formulas pass them), which fromJson maps to the names it's given.

Annotations
  • @immutable

Constructors

ScriptTest({String name = '', Json args = const {}, Json vars = const {}, Json nodes = const {}, Object? expect, String? expectError})
const

Properties

args → Json
final
expect → Object?
final
expectError → String?
final
hashCode → int
The hash code for this object.
no setteroverride
name → String
final
nodes → Json
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
vars → Json
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Json
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

argsByName(Object? args, List<String> paramNames) → Json
Arguments by parameter name from a map, or from a list in the order of paramNames (items past the last parameter are dropped).
fromJson(Object? json, [List<String> paramNames = const []]) → ScriptTest?