mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
It is expected that under enable-private-import internal/private symbols become public. So that symbol-diffing would fail. Disable symbol diffing under that test mode. rdar://51304243
50 lines
942 B
Swift
50 lines
942 B
Swift
// RUN: %target-resilience-test
|
|
// REQUIRES: executable_test
|
|
|
|
import StdlibUnittest
|
|
import class_insert_superclass
|
|
|
|
|
|
var ClassInsertSuperclassTest = TestSuite("ClassInsertSuperclass")
|
|
|
|
class FirstDerived : FirstMiddle {
|
|
func get2() -> String {
|
|
return "\(get()) \(get())"
|
|
}
|
|
}
|
|
|
|
ClassInsertSuperclassTest.test("First") {
|
|
let t = FirstDerived(x: "foo")
|
|
|
|
expectEqual("foo", t.get())
|
|
expectEqual("foo foo", t.get2())
|
|
}
|
|
|
|
class SecondDerived : SecondMiddle {
|
|
func get2() -> String {
|
|
return "\(get()) \(get())"
|
|
}
|
|
}
|
|
|
|
ClassInsertSuperclassTest.test("Second") {
|
|
let t = SecondDerived(x: "foo")
|
|
|
|
expectEqual("foo", t.get())
|
|
expectEqual("foo foo", t.get2())
|
|
}
|
|
|
|
class ThirdDerived : GenericMiddle<String> {
|
|
func get2() -> String {
|
|
return "\(get()) \(get())"
|
|
}
|
|
}
|
|
|
|
ClassInsertSuperclassTest.test("Third") {
|
|
let t = ThirdDerived(x: "foo")
|
|
|
|
expectEqual("foo", t.get())
|
|
expectEqual("foo foo", t.get2())
|
|
}
|
|
|
|
runAllTests()
|