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,
      );