File tree Expand file tree Collapse file tree
Tests/PostgresNIOTests/New Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 fail-fast : false
2121 matrix :
2222 swift-image :
23- - swift:6.0-jammy
24- - swift:6.1-noble
23+ - swift:6.1-jammy
2524 - swift:6.2-noble
25+ - swift:6.3-noble
2626 - swiftlang/swift:nightly-main-noble
2727 container : ${{ matrix.swift-image }}
2828 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1- // swift-tools-version:6.0
1+ // swift-tools-version:6.1
22import PackageDescription
33
4- #if compiler(>=6.1)
54let swiftSettings : [ SwiftSetting ] = [
65 . enableUpcomingFeature( " ExistentialAny " ) ,
76 . enableUpcomingFeature( " NonisolatedNonsendingByDefault " ) ,
87]
9- #else
10- let swiftSettings : [ SwiftSetting ] = [
11- . enableUpcomingFeature( " ExistentialAny " ) ,
12- // Sadly the 6.0 compiler concurrency checker finds false positives.
13- // To be able to compile, lets reduce the language version down to 5 for 6.0 only.
14- . swiftLanguageMode( . v5) ,
15- ]
16- #endif
178
189let package = Package (
1910 name: " postgres-nio " ,
Original file line number Diff line number Diff line change @@ -81,7 +81,6 @@ import NIOCore
8181 }
8282 }
8383
84- #if compiler(>=6.1)
8584 @Test func testDecodeFailureFromBytes( ) {
8685 let uuid = UUID ( )
8786 var buffer = ByteBuffer ( )
@@ -129,5 +128,4 @@ import NIOCore
129128 #expect( error == . typeMismatch)
130129 }
131130 }
132- #endif
133131}
Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ import NIOCore
4444 columnIndex: 1
4545 )
4646
47- #if compiler(>=6.1)
4847 let error = #expect( throws: PostgresDecodingError . self) {
4948 try cell. decode ( Int ? . self, context: . default)
5049 }
@@ -62,26 +61,5 @@ import NIOCore
6261 #expect( correctType)
6362 #expect( error. postgresType == . text)
6463 #expect( error. postgresFormat == . binary)
65- #else
66- do {
67- _ = try cell. decode ( Int ? . self, context: . default)
68- Issue . record ( " Expected to throw " )
69- } catch {
70- guard let error = error as? PostgresDecodingError else {
71- Issue . record ( " Expected error at this point " )
72- return
73- }
74-
75- #expect( error. file == #fileID)
76- #expect( error. line == #line - 9 )
77- #expect( error. code == . typeMismatch)
78- #expect( error. columnName == " hello " )
79- #expect( error. columnIndex == 1 )
80- let correctType = error. targetType == Int ? . self
81- #expect( correctType)
82- #expect( error. postgresType == . text)
83- #expect( error. postgresFormat == . binary)
84- }
85- #endif
8664 }
8765}
You can’t perform that action at this time.
0 commit comments