Skip to content

Commit a37fe1f

Browse files
committed
Fix objcImpl resilience tests
1 parent 1bc045a commit a37fe1f

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

test/Interpreter/objc_implementation_resilience.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
// Will not execute correctly without ObjC runtime support.
33
// REQUIRES: rdar109171643
44

5-
// RUN: %target-run-simple-swift(-import-objc-header %S/Inputs/objc_implementation.h -D TOP_LEVEL_CODE -D RESILIENCE -swift-version 5 -enable-experimental-feature CImplementation -enable-experimental-feature ObjCImplementationWithResilientStorage -target %target-future-triple) %S/objc_implementation.swift | %FileCheck %S/objc_implementation.swift --check-prefixes CHECK,CHECK-RESILIENCE
5+
// RUN: %target-run-simple-swift(-import-objc-header %S/Inputs/objc_implementation.h -D RESILIENCE -swift-version 5 -enable-experimental-feature CImplementation -enable-experimental-feature ObjCImplementationWithResilientStorage -target %target-future-triple %S/objc_implementation.swift) | %FileCheck %S/objc_implementation.swift --check-prefixes CHECK,CHECK-RESILIENCE
66
// REQUIRES: executable_test
77
// REQUIRES: objc_interop
8+
9+
@main struct Main {
10+
static func main() {
11+
ImplClass.runTests()
12+
}
13+
}

test/Interpreter/objc_implementation_resilience_swift_client.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,16 @@
3737

3838
// REQUIRES: executable_test
3939
// REQUIRES: objc_interop
40+
41+
@main struct Main {
42+
static func main() {
43+
ImplClass.runTests()
44+
45+
do {
46+
print("*** SwiftClientSubclass init ***")
47+
let swiftClientSub = SwiftClientSubclass()
48+
swiftClientSub.testSelf()
49+
print("*** SwiftClientSubclass end ***")
50+
}
51+
}
52+
}

test/Interpreter/objc_implementation_swift_client.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ class SwiftClientSubclass: ImplClass {
5858
#if RESILIENCE
5959
override class func makeResilientImpl() -> ImplClassWithResilientStoredProperty {
6060
SwiftResilientStoredClientSubclass()
61-
fatalError()
6261
}
6362
#endif
6463
}

0 commit comments

Comments
 (0)