From 809aec177e8be769a1203541fac78a36e781a7f1 Mon Sep 17 00:00:00 2001 From: Pierre Felgines Date: Fri, 4 Oct 2019 18:58:12 +0200 Subject: [PATCH] Use default value for isPerformanceFailure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Json contains data marked as “ActionTestFailureSummary” type but without `isPerformanceFailure` key. --- Sources/XCResultKit/ActionTestFailureSummary.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/XCResultKit/ActionTestFailureSummary.swift b/Sources/XCResultKit/ActionTestFailureSummary.swift index e2ee6fc..d08b830 100644 --- a/Sources/XCResultKit/ActionTestFailureSummary.swift +++ b/Sources/XCResultKit/ActionTestFailureSummary.swift @@ -26,7 +26,7 @@ public struct ActionTestFailureSummary: XCResultObject { message = xcOptional(element: "message", from: json) fileName = try xcRequired(element: "fileName", from: json) lineNumber = try xcRequired(element: "lineNumber", from: json) - isPerformanceFailure = try xcRequired(element: "isPerformanceFailure", from: json) + isPerformanceFailure = xcOptional(element: "isPerformanceFailure", from: json) ?? false } catch { debug("Error parsing ActionTestFailureSummary: \(error.localizedDescription)") return nil