Skip to content

Commit

Permalink
Actualized comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AllDmeat committed Dec 20, 2023
1 parent 8981705 commit edc3b70
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
18 changes: 14 additions & 4 deletions Sources/DBXCResultParser-TextFormatter/DBXCTextFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,22 @@ extension DBXCTextFormatter {
public class DBXCTextFormatter {
public init() { }

/// Formats the test report data into a string based on the specified format.

/// Formats a given report based on specified criteria.
///
/// This method takes a `DBXCReportModel` instance and formats it according to the provided parameters.
/// It allows filtering based on the status of tests within the report and supports different formatting styles.
/// The method can also localize the output based on the provided locale.
///
/// - Parameters:
/// - report: The `DBXCReportModel` containing the test report data.
/// - testResults: The test result statuses to include in the output. Defaults to all test statuses.
/// - Returns: A formatted string representation of the report data.
/// - report: The report model instance to be formatted.
/// - include: An array of `DBXCReportModel.Module.File.RepeatableTest.Test.Status` values that specifies which test statuses to include in the formatted report.
/// - format: The formatting style to be applied to the report.
/// - locale: An optional `Locale` to localize the formatted report. If nil, the system locale is used.
///
/// - Returns: A formatted string representation of the report based on the specified criteria.
///
/// - Throws: This method may throw an error if the formatting fails for any reason, such as an issue with the report model.
public func format(
_ report: DBXCReportModel,
include: [DBXCReportModel.Module.File.RepeatableTest.Test.Status] = .allCases,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extension DBXCReportModel {
/// - excludingCoverageNames: An array of strings representing the names of the targets to be excluded
/// from the code coverage report. Defaults to an empty array, meaning no
/// targets will be excluded.
/// - Throws: An error if the `.xcresult` file cannot be parsed or if required data is missing.
/// - Throws: An error if the `.xcresult` file cannot be parsed.
public init(
xcresultPath: URL,
excludingCoverageNames: [String] = []
Expand Down
2 changes: 2 additions & 0 deletions Sources/DBXCResultParser/Models/DBXCReportModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ extension DBXCReportModel.Module.File.RepeatableTest.Test {
case failure
case expectedFailure
case skipped

// there were multiple retries with different results
case mixed
case unknown
}
Expand Down

0 comments on commit edc3b70

Please sign in to comment.