@@ -126,10 +126,7 @@ SetTests.test("insert<Hashable>(_:)") {
126
126
expectEqual ( expected, s)
127
127
}
128
128
129
- SetTests . test ( " insert<Hashable>(_:)/CastTrap " )
130
- . crashOutputMatches ( " Could not cast value of type 'main.TestHashableDerivedA' " )
131
- . crashOutputMatches ( " to 'main.TestHashableDerivedB' " )
132
- . code {
129
+ SetTests . test ( " insert<Hashable>(_:)/FormerCastTrap " ) {
133
130
var s : Set < AnyHashable > = [
134
131
AnyHashable ( TestHashableDerivedA ( 1010 , identity: 1 ) ) ,
135
132
]
@@ -141,7 +138,6 @@ SetTests.test("insert<Hashable>(_:)/CastTrap")
141
138
expectEqual ( 1 , memberAfterInsert. identity)
142
139
}
143
140
144
- expectCrashLater ( )
145
141
_ = s. insert ( TestHashableDerivedB ( 1010 , identity: 3 ) )
146
142
}
147
143
@@ -181,10 +177,7 @@ SetTests.test("update<Hashable>(with:)") {
181
177
expectEqual ( expected, s)
182
178
}
183
179
184
- SetTests . test ( " update<Hashable>(with:)/CastTrap " )
185
- . crashOutputMatches ( " Could not cast value of type 'main.TestHashableDerivedA' " )
186
- . crashOutputMatches ( " to 'main.TestHashableDerivedB' " )
187
- . code {
180
+ SetTests . test ( " update<Hashable>(with:)/FormerCastTrap " ) {
188
181
var s : Set < AnyHashable > = [
189
182
AnyHashable ( TestHashableDerivedA ( 1010 , identity: 1 ) ) ,
190
183
]
@@ -194,7 +187,6 @@ SetTests.test("update<Hashable>(with:)/CastTrap")
194
187
expectEqual ( 1 , old. identity)
195
188
}
196
189
197
- expectCrashLater ( )
198
190
s. update ( with: TestHashableDerivedB ( 1010 , identity: 3 ) )
199
191
}
200
192
@@ -228,10 +220,7 @@ SetTests.test("remove<Hashable>(_:)") {
228
220
}
229
221
}
230
222
231
- SetTests . test ( " remove<Hashable>(_:)/CastTrap " )
232
- . crashOutputMatches ( " Could not cast value of type 'main.TestHashableDerivedA' " )
233
- . crashOutputMatches ( " to 'main.TestHashableDerivedB' " )
234
- . code {
223
+ SetTests . test ( " remove<Hashable>(_:)/FormerCastTrap " ) {
235
224
var s : Set < AnyHashable > = [
236
225
AnyHashable ( TestHashableDerivedA ( 1010 , identity: 1 ) ) ,
237
226
AnyHashable ( TestHashableDerivedA ( 2020 , identity: 1 ) ) ,
@@ -243,7 +232,6 @@ SetTests.test("remove<Hashable>(_:)/CastTrap")
243
232
expectEqual ( 1 , old. identity)
244
233
}
245
234
246
- expectCrashLater ( )
247
235
s. remove ( TestHashableDerivedB ( 2020 , identity: 2 ) )
248
236
}
249
237
0 commit comments