File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Tests/AWSLambdaEventsTests Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,8 @@ struct S3Tests {
112112 #expect( record. awsRegion == . eu_central_1)
113113 #expect( record. eventName == " ObjectCreated:Put " )
114114 #expect( record. eventTime. ISO8601Format ( ) == Date ( timeIntervalSince1970: 1_578_907_540.621 ) . ISO8601Format ( ) )
115+ // see https://github.com/swiftlang/swift-foundation/issues/1561#issuecomment-3448853449
116+ #expect( abs ( record. eventTime. timeIntervalSince1970 - 1_578_907_540.621 ) < 0.0005 )
115117 #expect( record. userIdentity == S3Event . UserIdentity ( principalId: " AWS:AAAAAAAJ2MQ4YFQZ7AULJ " ) )
116118 #expect( record. requestParameters == S3Event . RequestParameters ( sourceIPAddress: " 123.123.123.123 " ) )
117119 #expect( record. responseElements. count == 2 )
@@ -136,6 +138,8 @@ struct S3Tests {
136138 #expect( record. awsRegion == . eu_central_1)
137139 #expect( record. eventName == " ObjectRemoved:DeleteMarkerCreated " )
138140 #expect( record. eventTime. ISO8601Format ( ) == Date ( timeIntervalSince1970: 1_578_907_540.621 ) . ISO8601Format ( ) )
141+ // see https://github.com/swiftlang/swift-foundation/issues/1561#issuecomment-3448853449
142+ #expect( abs ( record. eventTime. timeIntervalSince1970 - 1_578_907_540.621 ) < 0.0005 )
139143 #expect( record. userIdentity == S3Event . UserIdentity ( principalId: " AWS:AAAAAAAJ2MQ4YFQZ7AULJ " ) )
140144 #expect( record. requestParameters == S3Event . RequestParameters ( sourceIPAddress: " 123.123.123.123 " ) )
141145 #expect( record. responseElements. count == 2 )
Original file line number Diff line number Diff line change @@ -68,7 +68,11 @@ struct DateWrapperTests {
6868 #if swift(<6.2)
6969 let error = ( any Error ) . self
7070 #else
71+ #if canImport(FoundationEssentials)
7172 let error = Never . self
73+ #else
74+ let error = ( any Error ) . self
75+ #endif
7276 #endif
7377 #expect( throws: error) {
7478 try JSONDecoder ( ) . decode ( TestEvent . self, from: json. data ( using: . utf8) !)
You can’t perform that action at this time.
0 commit comments