Skip to content

Commit

Permalink
Remove unneeded print statements (#101)
Browse files Browse the repository at this point in the history
* Change CoverageAction to write to given log handle

* Remove extraneous print statements from tests

rdar://87784021
  • Loading branch information
talzag authored Mar 29, 2022
1 parent f1abcfc commit d027bbb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public struct CoverageAction: Action {
public mutating func perform(logHandle: LogHandle) throws -> ActionResult {
switch documentationCoverageOptions.level {
case .brief, .detailed:
Swift.print(" --- Experimental coverage output enabled. ---")
var logHandle = logHandle
print(" --- Experimental coverage output enabled. ---", to: &logHandle)

let summaryString = try CoverageDataEntry.generateSummary(
ofDataAt: workingDirectory.appendingPathComponent(
Expand All @@ -38,7 +39,7 @@ public struct CoverageAction: Action {
shouldGenerateBrief: true,
shouldGenerateDetailed: (documentationCoverageOptions.level == .detailed)
)
print(summaryString)
print(summaryString, to: &logHandle)
case .none:
break
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -835,11 +835,6 @@ class ConvertServiceTests: XCTestCase {
assert: { renderNodes, referenceStore in
let referenceStore = try XCTUnwrap(referenceStore)
let paths = Set(referenceStore.topics.keys.map(\.path))

Set(referenceStore.topics.keys.map(\.path)).forEach { s in
print("path: \(s)")
}

XCTAssertTrue(paths.contains("/documentation/SideKit/SideClass/Element"))
XCTAssertFalse(paths.contains("/documentation/SideKit/SideClass/Element/Protocol-Implementations"))
}
Expand Down
1 change: 0 additions & 1 deletion Tests/SwiftDocCTests/Model/DocumentationMarkupTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ class DocumentationMarkupTests: XCTestCase {
Text " Abstract."
"""
let model = DocumentationMarkup(markup: Document(parsing: source, options: .parseBlockDirectives))
print(model.abstractSection!.content.map({ $0.detachedFromParent.debugDescription() }).joined(separator: "\n"))
XCTAssertEqual(expected, model.abstractSection?.content.map({ $0.detachedFromParent.debugDescription() }).joined(separator: "\n"))
}

Expand Down

0 comments on commit d027bbb

Please sign in to comment.