File tree Expand file tree Collapse file tree 11 files changed +48
-1
lines changed
Examples/BackgroundTasks/Sources
AWSLambdaRuntime/Vendored
Tests/AWSLambdaRuntimeCoreTests Expand file tree Collapse file tree 11 files changed +48
-1
lines changed Original file line number Diff line number Diff line change 1313//===----------------------------------------------------------------------===//
1414
1515import AWSLambdaRuntime
16+ #if canImport(FoundationEssentials)
17+ import FoundationEssentials
18+ #else
1619import Foundation
20+ #endif
1721
1822struct BackgroundProcessingHandler : LambdaWithBackgroundProcessingHandler {
1923 struct Input : Decodable {
Original file line number Diff line number Diff line change 2626//
2727//===----------------------------------------------------------------------===//
2828
29+ #if canImport(FoundationEssentials)
30+ import FoundationEssentials
31+ #else
2932import Foundation
33+ #endif
3034import NIOCore
3135
3236// This is NIO's `NIOFoundationCompat` module which at the moment only adds `ByteBuffer` utility methods
Original file line number Diff line number Diff line change 1212//
1313//===----------------------------------------------------------------------===//
1414
15+ #if canImport(FoundationEssentials)
16+ import FoundationEssentials
17+ #else
1518import Foundation
19+ #endif
1620import Logging
1721import NIOConcurrencyHelpers
1822import NIOCore
Original file line number Diff line number Diff line change 1212//
1313//===----------------------------------------------------------------------===//
1414
15+ #if canImport(FoundationEssentials)
16+ import FoundationEssentials
17+ #else
1518import Foundation
19+ #endif
1620import NIOCore
1721import NIOHTTP1
1822import NIOPosix
23+ import Dispatch
1924
2025struct MockServer {
2126 private let group : EventLoopGroup
Original file line number Diff line number Diff line change 1212//
1313//===----------------------------------------------------------------------===//
1414
15+ #if canImport(FoundationEssentials)
16+ import FoundationEssentials
17+ #else
1518import Foundation
19+ #endif
1620import NIOHTTP1
1721import Testing
1822
Original file line number Diff line number Diff line change 1313//===----------------------------------------------------------------------===//
1414
1515import AWSLambdaRuntimeCore
16+ #if canImport(FoundationEssentials)
17+ import FoundationEssentials
18+ #else
1619import Foundation
20+ #endif
1721import Logging
1822import NIOCore
1923
Original file line number Diff line number Diff line change 1212//
1313//===----------------------------------------------------------------------===//
1414
15+ #if canImport(FoundationEssentials)
16+ import FoundationEssentials
17+ #else
1518import Foundation
19+ #endif
1620import NIOCore
1721import Testing
1822
@@ -100,6 +104,7 @@ struct LambdaRequestIDTest {
100104 #expect( buffer. readableBytes == readableBeforeRead)
101105 }
102106
107+ #if os(macOS)
103108 @Test
104109 func testInitFromNSStringSuccess( ) {
105110 let nsString = NSMutableString ( capacity: 16 )
@@ -121,6 +126,7 @@ struct LambdaRequestIDTest {
121126 #expect( requestID? . uuidString == LambdaRequestID ( uuidString: nsString as String ) ? . uuidString)
122127 #expect( requestID? . uppercased == nsString as String )
123128 }
129+ #endif
124130
125131 @Test
126132 func testUnparse( ) {
Original file line number Diff line number Diff line change 1212//
1313//===----------------------------------------------------------------------===//
1414
15+ #if canImport(FoundationEssentials)
16+ import FoundationEssentials
17+ #else
1518import Foundation
19+ #endif
1620import Logging
1721import NIOCore
1822import Testing
Original file line number Diff line number Diff line change 1212//
1313//===----------------------------------------------------------------------===//
1414
15- import Foundation // for JSON
15+ #if canImport(FoundationEssentials)
16+ import FoundationEssentials
17+ #else
18+ import Foundation
19+ #endif
1620import Logging
1721import NIOCore
1822import NIOHTTP1
Original file line number Diff line number Diff line change 1212//
1313//===----------------------------------------------------------------------===//
1414
15+ #if canImport(FoundationEssentials)
16+ import FoundationEssentials
17+ #else
1518import Foundation
19+ #endif
1620
1721extension Date {
1822 var millisSinceEpoch : Int64 {
You can’t perform that action at this time.
0 commit comments