TestResult.fromJson constructor

TestResult.fromJson(
  1. Map _json
)

Implementation

TestResult.fromJson(core.Map _json)
    : this(
        debugMessages: _json.containsKey('debugMessages')
            ? (_json['debugMessages'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        errorPosition: _json.containsKey('errorPosition')
            ? SourcePosition.fromJson(
                _json['errorPosition'] as core.Map<core.String, core.dynamic>)
            : null,
        expressionReports: _json.containsKey('expressionReports')
            ? (_json['expressionReports'] as core.List)
                .map((value) => ExpressionReport.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        functionCalls: _json.containsKey('functionCalls')
            ? (_json['functionCalls'] as core.List)
                .map((value) => FunctionCall.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        state:
            _json.containsKey('state') ? _json['state'] as core.String : null,
        visitedExpressions: _json.containsKey('visitedExpressions')
            ? (_json['visitedExpressions'] as core.List)
                .map((value) => VisitedExpression.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );