Skip to content

Commit 8672ee1

Browse files
committed
remove ifdef _Concurrency
1 parent fa3c3df commit 8672ee1

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

Tests/TracingTests/DynamicTracepointTracerTests.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ final class DynamicTracepointTestTracer: LegacyTracer {
174174
}
175175

176176
private func shouldRecord(tracepoint: TracepointID) -> Bool {
177-
#if canImport(_Concurrency)
178177
if self.isActive(tracepoint: tracepoint) {
179178
// this tracepoint was specifically activated!
180179
return true
@@ -193,9 +192,6 @@ final class DynamicTracepointTestTracer: LegacyTracer {
193192
// there is some active trace already, so we should record as well
194193
// TODO: this logic may need to become smarter
195194
return true
196-
#else
197-
return false
198-
#endif
199195
}
200196

201197
func isActive(tracepoint: TracepointID) -> Bool {

Tests/TracingTests/TracerTests.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ final class TracerTests: XCTestCase {
108108
}
109109

110110
func testWithSpan_automaticBaggagePropagation_sync() throws {
111-
#if canImport(_Concurrency)
112111
guard #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) else {
113112
throw XCTSkip("Task locals are not supported on this platform.")
114113
}
@@ -133,11 +132,9 @@ final class TracerTests: XCTestCase {
133132

134133
XCTAssertEqual(value, "world")
135134
XCTAssertTrue(spanEnded)
136-
#endif
137135
}
138136

139137
func testWithSpan_automaticBaggagePropagation_sync_throws() throws {
140-
#if canImport(_Concurrency)
141138
guard #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) else {
142139
throw XCTSkip("Task locals are not supported on this platform.")
143140
}
@@ -163,11 +160,9 @@ final class TracerTests: XCTestCase {
163160
return
164161
}
165162
XCTFail("Should have thrown")
166-
#endif
167163
}
168164

169165
func testWithSpan_automaticBaggagePropagation_async() throws {
170-
#if canImport(_Concurrency)
171166
guard #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) else {
172167
throw XCTSkip("Task locals are not supported on this platform.")
173168
}
@@ -194,7 +189,6 @@ final class TracerTests: XCTestCase {
194189
XCTAssertEqual(value, "world")
195190
XCTAssertTrue(spanEnded.withValue { $0 })
196191
}
197-
#endif
198192
}
199193

200194
func testWithSpan_enterFromNonAsyncCode_passBaggage_asyncOperation() throws {
@@ -321,7 +315,6 @@ final class TracerTests: XCTestCase {
321315
}
322316

323317
func testWithSpan_recordErrorWithAttributes() throws {
324-
#if canImport(_Concurrency)
325318
guard #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) else {
326319
throw XCTSkip("Task locals are not supported on this platform.")
327320
}
@@ -348,7 +341,6 @@ final class TracerTests: XCTestCase {
348341
XCTAssertEqual(error as! ExampleSpanError, errorToThrow)
349342
let attrs = endedSpan!.recordedErrors.first!.1
350343
XCTAssertEqual(attrs, attrsForError)
351-
#endif
352344
}
353345

354346
func testWithSpanSignatures() {

0 commit comments

Comments
 (0)