TestHarness
The kind of test harness to use. This isn’t part of the manifest itself, but is used to guide the generation process.
enum TestHarness
The kind of test harness to use. This isn’t part of the manifest itself, but is used to guide the generation process.
enum TestHarness
import PackageModelSyntax
struct AddTarget
Add a target to a manifest’s source code.
case none
Don’t use any library
case xctest
Create a test using the XCTest library.
case swiftTesting
Create a test using the swift-testing package.
static func addTarget(_ target: TargetDescription, to manifest: SourceFileSyntax, configuration: Configuration = .init(), installedSwiftPMConfiguration: InstalledSwiftPMConfiguration = .default) throws -> PackageEditResult
Add the given target to the manifest, producing a set of edit results that updates the manifest and adds some source files to stub out the new target.
struct Configuration
Additional configuration information to guide the package editing process.
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
init?(rawValue: String)
static var `default`: TestHarness
The default testing library to use.
init(from decoder: any Decoder) throws
Creates a new instance by decoding from the given decoder, when the type’s RawValue
is String
.
var hashValue: Int { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func encode(to encoder: any Encoder) throws
Encodes this value into the given encoder, when the type’s RawValue
is String
.
func hash(into hasher: inout Hasher)