Skip to content

Commit 06a9e9f

Browse files
committed
[Test] Add executable tests for typed throws ABI
1 parent 5b46045 commit 06a9e9f

File tree

2 files changed

+0
-54
lines changed

2 files changed

+0
-54
lines changed

test/Interpreter/Inputs/typed_throws_abi_impl.swift

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,6 @@ public struct Impl: P {
8888
}
8989
return (1, 2, 3, 4, 5)
9090
}
91-
92-
public func nonMatching_f0(_ b: Bool) throws(OneWord) -> (Float, Float) {
93-
guard b else {
94-
throw OneWord()
95-
}
96-
return (1.0, 2.0)
97-
}
98-
99-
public func nonMatching_f1(_ b: Bool) throws(OneWord) -> (Float, Bool, Float) {
100-
guard b else {
101-
throw OneWord()
102-
}
103-
return (1.0, true, 2.0)
104-
}
10591
}
10692

10793
@available(SwiftStdlib 6.0, *)
@@ -189,20 +175,6 @@ public struct ImplAsync: PAsync {
189175
}
190176
return (1, 2, 3, 4, 5)
191177
}
192-
193-
public func nonMatching_f0(_ b: Bool) async throws(OneWord) -> (Float, Float) {
194-
guard b else {
195-
throw OneWord()
196-
}
197-
return (1.0, 2.0)
198-
}
199-
200-
public func nonMatching_f1(_ b: Bool) async throws(OneWord) -> (Float, Bool, Float) {
201-
guard b else {
202-
throw OneWord()
203-
}
204-
return (1.0, true, 2.0)
205-
}
206178
}
207179

208180
public protocol P {
@@ -219,9 +191,6 @@ public protocol P {
219191
func g3(_ b: Bool) throws(OneWord) -> (Int, Int, Int)
220192
func g4(_ b: Bool) throws(OneWord) -> (Int, Int, Int, Int)
221193
func g5(_ b: Bool) throws(OneWord) -> (Int, Int, Int, Int, Int)
222-
223-
func nonMatching_f0(_ b: Bool) throws(OneWord) -> (Float, Float)
224-
func nonMatching_f1(_ b: Bool) throws(OneWord) -> (Float, Bool, Float)
225194
}
226195

227196
@available(SwiftStdlib 6.0, *)
@@ -239,7 +208,4 @@ public protocol PAsync {
239208
func g3(_ b: Bool) async throws(OneWord) -> (Int, Int, Int)
240209
func g4(_ b: Bool) async throws(OneWord) -> (Int, Int, Int, Int)
241210
func g5(_ b: Bool) async throws(OneWord) -> (Int, Int, Int, Int, Int)
242-
243-
func nonMatching_f0(_ b: Bool) async throws(OneWord) -> (Float, Float)
244-
func nonMatching_f1(_ b: Bool) async throws(OneWord) -> (Float, Bool, Float)
245211
}

test/Interpreter/typed_throws_abi.swift

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,6 @@ func checkSync() async {
7777
await invoke { try impl.g5(true) }
7878
// CHECK: Error: OneWord(x: 0)
7979
await invoke { try impl.g5(false) }
80-
81-
// CHECK: Success: (1.0, 2.0)
82-
await invoke { try impl.nonMatching_f0(true) }
83-
// CHECK: Error: OneWord(x: 0)
84-
await invoke { try impl.nonMatching_f0(false) }
85-
86-
// CHECK: Success: (1.0, true, 2.0)
87-
await invoke { try impl.nonMatching_f1(true) }
88-
// CHECK: Error: OneWord(x: 0)
89-
await invoke { try impl.nonMatching_f1(false) }
9080
}
9181

9282
func checkAsync() async {
@@ -150,16 +140,6 @@ func checkAsync() async {
150140
await invoke { try await impl.g5(true) }
151141
// CHECK: Error: OneWord(x: 0)
152142
await invoke { try await impl.g5(false) }
153-
154-
// CHECK: Success: (1.0, 2.0)
155-
await invoke { try await impl.nonMatching_f0(true) }
156-
// CHECK: Error: OneWord(x: 0)
157-
await invoke { try await impl.nonMatching_f0(false) }
158-
159-
// CHECK: Success: (1.0, true, 2.0)
160-
await invoke { try await impl.nonMatching_f1(true) }
161-
// CHECK: Error: OneWord(x: 0)
162-
await invoke { try await impl.nonMatching_f1(false) }
163143
}
164144

165145
@main

0 commit comments

Comments
 (0)