Skip to content

Commit 91ba087

Browse files
authored
Merge pull request #89 from virtan/making--tracing-computed-var-20200714T163206
Making .tracing computed var in Context public
2 parents b681e65 + 38e472e commit 91ba087

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Sources/TSCUtility/Tracing.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ extension Context {
122122
return self
123123
}
124124

125-
var tracing: Tracing.Collection? {
125+
public var tracing: Tracing.Collection? {
126126
get {
127127
guard let collection = self[ObjectIdentifier(Tracing.Collection.self)] as? Tracing.Collection else {
128128
return nil

Tests/TSCUtilityTests/TracingTests.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ class TracingTests: XCTestCase {
1919
collection.events.append(event2)
2020
XCTAssertEqual(collection.events.count, 2)
2121
var ctx = Context()
22-
ctx.set(collection)
23-
XCTAssertEqual(ctx.get(Tracing.Collection.self).events.count, 2)
22+
ctx.tracing = collection
23+
XCTAssertEqual(ctx.tracing?.events.count, 2)
24+
2425
}
2526
}

0 commit comments

Comments
 (0)