Skip to content

Commit 7e9b8fe

Browse files
committed
Fix Evolution tests in the mode when StdlibUnittest is built with -sil-serialize-all
1 parent fea58c8 commit 7e9b8fe

20 files changed

+180
-0
lines changed

validation-test/Evolution/test_class_add_property.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@
2525
import StdlibUnittest
2626
import class_add_property
2727

28+
// Also import modules which are used by StdlibUnittest internally. This
29+
// workaround is needed to link all required libraries in case we compile
30+
// StdlibUnittest with -sil-serialize-all.
31+
import SwiftPrivate
32+
import SwiftPrivatePthreadExtras
33+
#if _runtime(_ObjC)
34+
import ObjectiveC
35+
#endif
36+
2837
var ClassAddPropertyTest = TestSuite("ClassAddProperty")
2938

3039
ClassAddPropertyTest.test("AddStoredProperty") {

validation-test/Evolution/test_class_change_size.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@
2525
import StdlibUnittest
2626
import class_change_size
2727

28+
// Also import modules which are used by StdlibUnittest internally. This
29+
// workaround is needed to link all required libraries in case we compile
30+
// StdlibUnittest with -sil-serialize-all.
31+
import SwiftPrivate
32+
import SwiftPrivatePthreadExtras
33+
#if _runtime(_ObjC)
34+
import ObjectiveC
35+
#endif
36+
2837
var ClassChangeSizeTest = TestSuite("ClassChangeSize")
2938

3039
func increment(inout c: ChangeSize) {

validation-test/Evolution/test_class_change_stored_to_computed.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@
2424
import StdlibUnittest
2525
import class_change_stored_to_computed
2626

27+
// Also import modules which are used by StdlibUnittest internally. This
28+
// workaround is needed to link all required libraries in case we compile
29+
// StdlibUnittest with -sil-serialize-all.
30+
import SwiftPrivate
31+
import SwiftPrivatePthreadExtras
32+
#if _runtime(_ObjC)
33+
import ObjectiveC
34+
#endif
35+
2736
var ChangeStoredToComputedTest = TestSuite("ChangeStoredToComputed")
2837

2938
ChangeStoredToComputedTest.test("ChangeStoredToComputed") {

validation-test/Evolution/test_class_remove_property.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@
2424
import StdlibUnittest
2525
import class_remove_property
2626

27+
// Also import modules which are used by StdlibUnittest internally. This
28+
// workaround is needed to link all required libraries in case we compile
29+
// StdlibUnittest with -sil-serialize-all.
30+
import SwiftPrivate
31+
import SwiftPrivatePthreadExtras
32+
#if _runtime(_ObjC)
33+
import ObjectiveC
34+
#endif
35+
2736
var ClassRemovePropertyTest = TestSuite("ClassRemoveProperty")
2837

2938
ClassRemovePropertyTest.test("RemoveStoredProperty") {

validation-test/Evolution/test_enum_add_cases.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@
2424
import StdlibUnittest
2525
import enum_add_cases
2626

27+
// Also import modules which are used by StdlibUnittest internally. This
28+
// workaround is needed to link all required libraries in case we compile
29+
// StdlibUnittest with -sil-serialize-all.
30+
import SwiftPrivate
31+
import SwiftPrivatePthreadExtras
32+
#if _runtime(_ObjC)
33+
import ObjectiveC
34+
#endif
35+
2736
var EnumAddCasesTest = TestSuite("EnumAddCases")
2837

2938
func myAddNoPayloadToSingletonCases() -> [AddNoPayloadToSingleton] {

validation-test/Evolution/test_enum_change_size.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@
2424
import StdlibUnittest
2525
import enum_change_size
2626

27+
// Also import modules which are used by StdlibUnittest internally. This
28+
// workaround is needed to link all required libraries in case we compile
29+
// StdlibUnittest with -sil-serialize-all.
30+
import SwiftPrivate
31+
import SwiftPrivatePthreadExtras
32+
#if _runtime(_ObjC)
33+
import ObjectiveC
34+
#endif
35+
2736
var EnumChangeSizeTest = TestSuite("EnumChangeSize")
2837

2938
public func getMySingletonEnumValues(c: ChangeSize)

validation-test/Evolution/test_function_change_transparent_body.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@
2727
import StdlibUnittest
2828
import function_change_transparent_body
2929

30+
// Also import modules which are used by StdlibUnittest internally. This
31+
// workaround is needed to link all required libraries in case we compile
32+
// StdlibUnittest with -sil-serialize-all.
33+
import SwiftPrivate
34+
import SwiftPrivatePthreadExtras
35+
#if _runtime(_ObjC)
36+
import ObjectiveC
37+
#endif
38+
3039
var ChangeTransparentBodyTest = TestSuite("ChangeTransparentBody")
3140

3241
ChangeTransparentBodyTest.test("ChangeTransparentBody") {

validation-test/Evolution/test_global_change_size.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@
2424
import StdlibUnittest
2525
import global_change_size
2626

27+
// Also import modules which are used by StdlibUnittest internally. This
28+
// workaround is needed to link all required libraries in case we compile
29+
// StdlibUnittest with -sil-serialize-all.
30+
import SwiftPrivate
31+
import SwiftPrivatePthreadExtras
32+
#if _runtime(_ObjC)
33+
import ObjectiveC
34+
#endif
35+
2736
var GlobalChangeSizeTest = TestSuite("GlobalChangeSize")
2837

2938
var globalChangeEmptyToNonEmpty = ChangeEmptyToNonEmpty()

validation-test/Evolution/test_global_stored_to_computed.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@
2424
import StdlibUnittest
2525
import global_stored_to_computed
2626

27+
// Also import modules which are used by StdlibUnittest internally. This
28+
// workaround is needed to link all required libraries in case we compile
29+
// StdlibUnittest with -sil-serialize-all.
30+
import SwiftPrivate
31+
import SwiftPrivatePthreadExtras
32+
#if _runtime(_ObjC)
33+
import ObjectiveC
34+
#endif
35+
2736
var GlobalStoredToComputed = TestSuite("GlobalStoredToComputed")
2837

2938
GlobalStoredToComputed.test("ChangeStoredToComputed") {

validation-test/Evolution/test_struct_add_property.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@
2424
import StdlibUnittest
2525
import struct_add_property
2626

27+
// Also import modules which are used by StdlibUnittest internally. This
28+
// workaround is needed to link all required libraries in case we compile
29+
// StdlibUnittest with -sil-serialize-all.
30+
import SwiftPrivate
31+
import SwiftPrivatePthreadExtras
32+
#if _runtime(_ObjC)
33+
import ObjectiveC
34+
#endif
35+
2736
var StructAddPropertyTest = TestSuite("StructAddProperty")
2837

2938
StructAddPropertyTest.test("AddStoredProperty") {

0 commit comments

Comments
 (0)