File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,6 @@ public enum Argument: Equatable {
12
12
public init ( verbatim string: String ) {
13
13
self = . verbatim( string)
14
14
}
15
-
16
- public var string : String {
17
- switch self {
18
- case let . quoted( value) :
19
- return value. quoted
20
- case let . verbatim( string) :
21
- return string
22
- }
23
- }
24
15
}
25
16
26
17
@@ -32,7 +23,14 @@ extension Argument: ExpressibleByStringLiteral {
32
23
33
24
34
25
extension Argument : CustomStringConvertible {
35
- public var description : String { string }
26
+ public var description : String {
27
+ switch self {
28
+ case let . quoted( value) :
29
+ return value. quoted
30
+ case let . verbatim( string) :
31
+ return string
32
+ }
33
+ }
36
34
}
37
35
38
36
Original file line number Diff line number Diff line change @@ -210,12 +210,12 @@ class ShellOutTests: XCTestCase {
210
210
}
211
211
212
212
func test_Argument_ExpressibleByStringLiteral( ) throws {
213
- XCTAssertEqual ( ( " foo " as Argument ) . string , " foo " )
214
- XCTAssertEqual ( ( " foo bar " as Argument ) . string , " 'foo bar' " )
213
+ XCTAssertEqual ( ( " foo " as Argument ) . description , " foo " )
214
+ XCTAssertEqual ( ( " foo bar " as Argument ) . description , " 'foo bar' " )
215
215
}
216
216
217
217
func test_Argument_url( ) throws {
218
- XCTAssertEqual ( Argument . url ( . init( string: " https://example.com " ) !) . string ,
218
+ XCTAssertEqual ( Argument . url ( . init( string: " https://example.com " ) !) . description ,
219
219
" https://example.com " )
220
220
}
221
221
You can’t perform that action at this time.
0 commit comments