@@ -49,20 +49,20 @@ class ExpressibleByLiteralsTests: XCTestCase {
4949
5050 // Optional
5151 Given ( mock, . methodWithOtionalStringParameter( p: . any, willReturn: 0 ) )
52- Given ( mock, . methodWithOtionalStringParameter( p: " a " , willReturn: 1 ) )
53- Given ( mock, . methodWithOtionalStringParameter( p: " b " , willReturn: 2 ) )
52+ Given ( mock, . methodWithOtionalStringParameter( p: . value ( " a " ) , willReturn: 1 ) )
53+ Given ( mock, . methodWithOtionalStringParameter( p: . value ( " b " ) , willReturn: 2 ) )
5454 Given ( mock, . methodWithOtionalStringParameter( p: nil , willReturn: 3 ) )
5555
5656 XCTAssertEqual ( mock. methodWithOtionalStringParameter ( p: " a " ) , 1 )
5757 XCTAssertEqual ( mock. methodWithOtionalStringParameter ( p: " b " ) , 2 )
5858 XCTAssertEqual ( mock. methodWithOtionalStringParameter ( p: " c " ) , 0 )
5959 XCTAssertEqual ( mock. methodWithOtionalStringParameter ( p: nil ) , 3 )
6060
61- Verify ( mock, . methodWithOtionalStringParameter( p: " a " ) )
62- Verify ( mock, . methodWithOtionalStringParameter( p: " b " ) )
63- Verify ( mock, . methodWithOtionalStringParameter( p: " c " ) )
61+ Verify ( mock, . methodWithOtionalStringParameter( p: . value ( " a " ) ) )
62+ Verify ( mock, . methodWithOtionalStringParameter( p: . value ( " b " ) ) )
63+ Verify ( mock, . methodWithOtionalStringParameter( p: . value ( " c " ) ) )
6464 Verify ( mock, . methodWithOtionalStringParameter( p: nil ) )
65- Verify ( mock, . never, . methodWithOtionalStringParameter( p: " d " ) )
65+ Verify ( mock, . never, . methodWithOtionalStringParameter( p: . value ( " d " ) ) )
6666 Verify ( mock, 4 , . methodWithOtionalStringParameter( p: . any) )
6767
6868 // Custom
@@ -83,8 +83,8 @@ class ExpressibleByLiteralsTests: XCTestCase {
8383
8484 // Custom Optional
8585 Given ( mock, . methodWithCustomOptionalStringParameter( p: . any, willReturn: 0 ) )
86- Given ( mock, . methodWithCustomOptionalStringParameter( p: " a " , willReturn: 1 ) )
87- Given ( mock, . methodWithCustomOptionalStringParameter( p: " b " , willReturn: 2 ) )
86+ Given ( mock, . methodWithCustomOptionalStringParameter( p: . value ( " a " ) , willReturn: 1 ) )
87+ Given ( mock, . methodWithCustomOptionalStringParameter( p: . value ( " b " ) , willReturn: 2 ) )
8888 Given ( mock, . methodWithCustomOptionalStringParameter( p: nil , willReturn: 3 ) )
8989
9090 XCTAssertEqual ( mock. methodWithCustomOptionalStringParameter ( p: CustomString . a) , 1 )
@@ -93,11 +93,11 @@ class ExpressibleByLiteralsTests: XCTestCase {
9393 XCTAssertEqual ( mock. methodWithCustomOptionalStringParameter ( p: nil ) , 3 )
9494
9595 Verify ( mock, 1 , . methodWithCustomOptionalStringParameter( p: . value( CustomString . a) ) )
96- Verify ( mock, 1 , . methodWithCustomOptionalStringParameter( p: " a " ) )
97- Verify ( mock, . methodWithCustomOptionalStringParameter( p: " b " ) )
98- Verify ( mock, . methodWithCustomOptionalStringParameter( p: " c " ) )
96+ Verify ( mock, 1 , . methodWithCustomOptionalStringParameter( p: . value ( " a " ) ) )
97+ Verify ( mock, . methodWithCustomOptionalStringParameter( p: . value ( " b " ) ) )
98+ Verify ( mock, . methodWithCustomOptionalStringParameter( p: . value ( " c " ) ) )
9999 Verify ( mock, . methodWithCustomOptionalStringParameter( p: nil ) )
100- Verify ( mock, . never, . methodWithCustomOptionalStringParameter( p: " d " ) )
100+ Verify ( mock, . never, . methodWithCustomOptionalStringParameter( p: . value ( " d " ) ) )
101101
102102 Verify ( mock, 4 , . methodWithCustomOptionalStringParameter( p: . any) )
103103 }
@@ -121,8 +121,8 @@ class ExpressibleByLiteralsTests: XCTestCase {
121121
122122 // Custom Optional
123123 Given ( mock, . methodWithCustomOptionalIntParameter( p: . any, willReturn: 0 ) )
124- Given ( mock, . methodWithCustomOptionalIntParameter( p: 1 , willReturn: 1 ) )
125- Given ( mock, . methodWithCustomOptionalIntParameter( p: 2 , willReturn: 2 ) )
124+ Given ( mock, . methodWithCustomOptionalIntParameter( p: . value ( 1 ) , willReturn: 1 ) )
125+ Given ( mock, . methodWithCustomOptionalIntParameter( p: . value ( 2 ) , willReturn: 2 ) )
126126 Given ( mock, . methodWithCustomOptionalIntParameter( p: nil , willReturn: 3 ) )
127127
128128 XCTAssertEqual ( mock. methodWithCustomOptionalIntParameter ( p: CustomInt . value ( 1 ) ) , 1 )
@@ -131,9 +131,9 @@ class ExpressibleByLiteralsTests: XCTestCase {
131131 XCTAssertEqual ( mock. methodWithCustomOptionalIntParameter ( p: nil ) , 3 )
132132
133133 Verify ( mock, 1 , . methodWithCustomOptionalIntParameter( p: . value( CustomInt . zero) ) )
134- Verify ( mock, 1 , . methodWithCustomOptionalIntParameter( p: 1 ) )
135- Verify ( mock, . methodWithCustomOptionalIntParameter( p: 2 ) )
136- Verify ( mock, . methodWithCustomOptionalIntParameter( p: 0 ) )
134+ Verify ( mock, 1 , . methodWithCustomOptionalIntParameter( p: . value ( 1 ) ) )
135+ Verify ( mock, . methodWithCustomOptionalIntParameter( p: . value ( 2 ) ) )
136+ Verify ( mock, . methodWithCustomOptionalIntParameter( p: . value ( 0 ) ) )
137137 Verify ( mock, . methodWithCustomOptionalIntParameter( p: nil ) )
138138 Verify ( mock, . never, . methodWithCustomOptionalIntParameter( p: . value( CustomInt . value ( 15 ) ) ) )
139139
@@ -145,17 +145,17 @@ class ExpressibleByLiteralsTests: XCTestCase {
145145
146146 Given ( mock, . methodWithBool( p: . any, willReturn: 0 ) )
147147 Given ( mock, . methodWithBool( p: nil , willReturn: - 1 ) )
148- Given ( mock, . methodWithBool( p: true , willReturn: 2 ) )
149- Given ( mock, . methodWithBool( p: false , willReturn: 1 ) )
148+ Given ( mock, . methodWithBool( p: . value ( true ) , willReturn: 2 ) )
149+ Given ( mock, . methodWithBool( p: . value ( false ) , willReturn: 1 ) )
150150
151151 XCTAssertEqual ( mock. methodWithBool ( p: nil ) , - 1 )
152152 XCTAssertEqual ( mock. methodWithBool ( p: true ) , 2 )
153153 XCTAssertEqual ( mock. methodWithBool ( p: false ) , 1 )
154154
155155 Verify ( mock, 1 , . methodWithBool( p: nil ) )
156156 Verify ( mock, 1 , . methodWithBool( p: . value( nil ) ) )
157- Verify ( mock, 1 , . methodWithBool( p: true ) )
158- Verify ( mock, 1 , . methodWithBool( p: false ) )
157+ Verify ( mock, 1 , . methodWithBool( p: . value ( true ) ) )
158+ Verify ( mock, 1 , . methodWithBool( p: . value ( false ) ) )
159159 Verify ( mock, 3 , . methodWithBool( p: . any) )
160160 Verify ( mock, 2 , . methodWithBool( p: . notNil) )
161161 }
@@ -165,8 +165,8 @@ class ExpressibleByLiteralsTests: XCTestCase {
165165
166166 Given ( mock, . methodWithFloat( p: . any, willReturn: 0 ) )
167167 Given ( mock, . methodWithFloat( p: nil , willReturn: - 1 ) )
168- Given ( mock, . methodWithFloat( p: 1.0 , willReturn: 1 ) )
169- Given ( mock, . methodWithFloat( p: 2 , willReturn: 2 ) )
168+ Given ( mock, . methodWithFloat( p: . value ( 1.0 ) , willReturn: 1 ) )
169+ Given ( mock, . methodWithFloat( p: . value ( 2 ) , willReturn: 2 ) )
170170
171171 XCTAssertEqual ( mock. methodWithFloat ( p: nil ) , - 1 )
172172 XCTAssertEqual ( mock. methodWithFloat ( p: 1.0000001 ) , 0 )
@@ -177,8 +177,8 @@ class ExpressibleByLiteralsTests: XCTestCase {
177177
178178 Given ( mock, . methodWithDouble( p: . any, willReturn: 0 ) )
179179 Given ( mock, . methodWithDouble( p: nil , willReturn: - 1 ) )
180- Given ( mock, . methodWithDouble( p: 1.0 , willReturn: 1 ) )
181- Given ( mock, . methodWithDouble( p: 2 , willReturn: 2 ) )
180+ Given ( mock, . methodWithDouble( p: . value ( 1.0 ) , willReturn: 1 ) )
181+ Given ( mock, . methodWithDouble( p: . value ( 2 ) , willReturn: 2 ) )
182182
183183 XCTAssertEqual ( mock. methodWithDouble ( p: nil ) , - 1 )
184184 XCTAssertEqual ( mock. methodWithDouble ( p: 1.0000001 ) , 0 )
@@ -224,8 +224,8 @@ class ExpressibleByLiteralsTests: XCTestCase {
224224 Verify ( mock, . once, . methodWithSetOfInt( p: [ 2 , 3 , 4 ] ) )
225225
226226 Given ( mock, . methodWithOptionalSetOfInt( p: . any, willReturn: 0 ) )
227- Given ( mock, . methodWithOptionalSetOfInt( p: [ 0 , 1 , 2 ] , willReturn: 1 ) )
228- Given ( mock, . methodWithOptionalSetOfInt( p: [ 2 , 3 , 4 ] , willReturn: 2 ) )
227+ Given ( mock, . methodWithOptionalSetOfInt( p: . value ( [ 0 , 1 , 2 ] ) , willReturn: 1 ) )
228+ Given ( mock, . methodWithOptionalSetOfInt( p: . value ( [ 2 , 3 , 4 ] ) , willReturn: 2 ) )
229229 Given ( mock, . methodWithOptionalSetOfInt( p: nil , willReturn: 3 ) )
230230
231231 XCTAssertEqual ( mock. methodWithOptionalSetOfInt ( p: [ 0 , 1 ] ) , 0 )
@@ -234,9 +234,9 @@ class ExpressibleByLiteralsTests: XCTestCase {
234234 XCTAssertEqual ( mock. methodWithOptionalSetOfInt ( p: nil ) , 3 )
235235
236236 Verify ( mock, 4 , . methodWithOptionalSetOfInt( p: . any) )
237- Verify ( mock, . once, . methodWithOptionalSetOfInt( p: [ 0 , 1 ] ) )
238- Verify ( mock, . once, . methodWithOptionalSetOfInt( p: [ 0 , 1 , 2 ] ) )
239- Verify ( mock, . once, . methodWithOptionalSetOfInt( p: [ 2 , 3 , 4 ] ) )
237+ Verify ( mock, . once, . methodWithOptionalSetOfInt( p: . value ( [ 0 , 1 ] ) ) )
238+ Verify ( mock, . once, . methodWithOptionalSetOfInt( p: . value ( [ 0 , 1 , 2 ] ) ) )
239+ Verify ( mock, . once, . methodWithOptionalSetOfInt( p: . value ( [ 2 , 3 , 4 ] ) ) )
240240 Verify ( mock, . once, . methodWithOptionalSetOfInt( p: nil ) )
241241 }
242242
0 commit comments