@@ -95,6 +95,17 @@ extension SwiftVersion: Codable {
9595 /// Whether the Swift libraries need to be referenced in their system
9696 /// location (/usr/lib/swift) via rpath.
9797 let librariesRequireRPath : Bool
98+
99+ static func dummyForTesting( _ toolchain: Toolchain ) -> Self {
100+ let dummyForTestingTriple = Triple . dummyForTesting ( toolchain)
101+ return Self (
102+ triple: dummyForTestingTriple,
103+ unversionedTriple: dummyForTestingTriple,
104+ moduleTriple: dummyForTestingTriple,
105+ swiftRuntimeCompatibilityVersion: nil ,
106+ compatibilityLibraries: [ ] ,
107+ librariesRequireRPath: false )
108+ }
98109 }
99110
100111 @_spi ( Testing) public struct Paths : Codable {
@@ -103,12 +114,25 @@ extension SwiftVersion: Codable {
103114 public let runtimeLibraryPaths : [ TextualVirtualPath ]
104115 public let runtimeLibraryImportPaths : [ TextualVirtualPath ]
105116 public let runtimeResourcePath : TextualVirtualPath
117+
118+ static let dummyForTesting = Paths (
119+ sdkPath: nil ,
120+ runtimeLibraryPaths: [ ] ,
121+ runtimeLibraryImportPaths: [ ] ,
122+ runtimeResourcePath: . dummyForTesting)
106123 }
107124
108125 var compilerVersion : String
109126 var target : Target
110127 var targetVariant : Target ?
111128 let paths : Paths
129+
130+ static func dummyForTesting( _ toolchain: Toolchain ) -> Self {
131+ Self ( compilerVersion: " dummy " ,
132+ target: . dummyForTesting( toolchain) ,
133+ targetVariant: nil ,
134+ paths: . dummyForTesting)
135+ }
112136}
113137
114138// Make members of `FrontendTargetInfo.Paths` accessible on `FrontendTargetInfo`.
0 commit comments