-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for xcresult v3.34 (#65)
Change Description: Adds support for new properties and objects described in xcresulttool's v3.34 of the formatDescription. Test Plan/Testing Performed: Need to add unit tests for the new objects. Was able to confirm that new UUID properties were parsing out properly with existing xcresult.
- Loading branch information
1 parent
7b7972e
commit 4553702
Showing
10 changed files
with
579 additions
and
2 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// ActionTestConfiguration.swift | ||
// XCParseCore | ||
// | ||
// Created by Alex Botkin on 8/16/21. | ||
// Copyright © 2021 ChargePoint, Inc. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
// xcresult 3.34 and above | ||
open class ActionTestConfiguration : Codable { | ||
public let values: SortedKeyValueArray | ||
|
||
enum ActionTestConfigurationCodingKeys: String, CodingKey { | ||
case values | ||
} | ||
|
||
required public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: ActionTestConfigurationCodingKeys.self) | ||
values = try container.decodeXCResultObject(forKey: .values) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// ActionTestExpectedFailure.swift | ||
// XCParseCore | ||
// | ||
// Created by Alex Botkin on 8/16/21. | ||
// Copyright © 2021 ChargePoint, Inc. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
// xcresult 3.34 and above | ||
open class ActionTestExpectedFailure : Codable { | ||
public let uuid: String | ||
public let failureReason: String? | ||
public let failureSummary: ActionTestFailureSummary? | ||
public let isTopLevelFailure: Bool | ||
|
||
enum ActionTestExpectedFailureCodingKeys: String, CodingKey { | ||
case uuid | ||
case failureReason | ||
case failureSummary | ||
case isTopLevelFailure | ||
} | ||
|
||
required public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: ActionTestExpectedFailureCodingKeys.self) | ||
|
||
uuid = try container.decodeXCResultType(forKey: .uuid) | ||
failureReason = try container.decodeXCResultTypeIfPresent(forKey: .failureReason) | ||
failureSummary = try container.decodeXCResultObjectIfPresent(forKey: .failureSummary) | ||
isTopLevelFailure = try container.decodeXCResultType(forKey: .isTopLevelFailure) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// ActionTestNoticeSummary.swift | ||
// XCParseCore | ||
// | ||
// Created by Alex Botkin on 8/16/21. | ||
// Copyright © 2021 ChargePoint, Inc. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
open class ActionTestNoticeSummary : Codable { | ||
public let message: String? | ||
public let fileName: String | ||
public let lineNumber: Int | ||
|
||
enum ActionTestNoticeSummaryCodingKeys: String, CodingKey { | ||
case message | ||
case fileName | ||
case lineNumber | ||
} | ||
|
||
required public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: ActionTestNoticeSummaryCodingKeys.self) | ||
|
||
message = try container.decodeXCResultTypeIfPresent(forKey: .message) | ||
fileName = try container.decodeXCResultType(forKey: .fileName) | ||
lineNumber = try container.decodeXCResultType(forKey: .lineNumber) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
Sources/XCParseCore/ActionTestRepetitionPolicySummary.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// ActionTestRepetitionPolicySummary.swift | ||
// XCParseCore | ||
// | ||
// Created by Alex Botkin on 8/16/21. | ||
// Copyright © 2021 ChargePoint, Inc. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
// xcresult 3.34 and above | ||
open class ActionTestRepetitionPolicySummary : Codable { | ||
public let iteration: Int? | ||
public let totalIterations: Int? | ||
public let repetitionMode: String? | ||
|
||
enum ActionTestRepetitionPolicySummaryCodingKeys: String, CodingKey { | ||
case iteration | ||
case totalIterations | ||
case repetitionMode | ||
} | ||
|
||
required public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: ActionTestRepetitionPolicySummaryCodingKeys.self) | ||
|
||
iteration = try container.decodeXCResultTypeIfPresent(forKey: .iteration) | ||
totalIterations = try container.decodeXCResultTypeIfPresent(forKey: .totalIterations) | ||
repetitionMode = try container.decodeXCResultTypeIfPresent(forKey: .repetitionMode) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters