@@ -19,11 +19,11 @@ class HexColorCodeScalarTest extends Specification {
1919 then :
2020 result. equals(expectedValue)
2121 where :
22- input | expectedValue
23- " #ff0000" | mkColor(0xff , 0 , 0 )
24- " #123" | mkColor(0x11 , 0x22 , 0x33 )
25- " #11223344" | mkColor(0x11 , 0x22 , 0x33 , 0x44 )
26- " #1234" | mkColor(0x11 , 0x22 , 0x33 , 0x44 )
22+ input | expectedValue
23+ " #ff0000" | mkColor(0xff , 0 , 0 )
24+ " #123" | mkColor(0x11 , 0x22 , 0x33 )
25+ " #11223344" | mkColor(0x11 , 0x22 , 0x33 , 0x44 )
26+ " #1234" | mkColor(0x11 , 0x22 , 0x33 , 0x44 )
2727 }
2828
2929 @Unroll
@@ -47,12 +47,12 @@ class HexColorCodeScalarTest extends Specification {
4747 then :
4848 result == expectedValue
4949 where :
50- input | expectedValue
51- " #ff0000" | " #ff0000"
52- " #123" | " #112233"
53- " #11223344" | " #11223344"
54- " #1234" | " #11223344"
55- mkColor(0x21 , 0x23 , 0x33 ) | " #212333"
50+ input | expectedValue
51+ " #ff0000" | " #ff0000"
52+ " #123" | " #112233"
53+ " #11223344" | " #11223344"
54+ " #1234" | " #11223344"
55+ mkColor(0x21 , 0x23 , 0x33 ) | " #212333"
5656 mkColor(0x21 , 0x23 , 0x33 , 0x44 ) | " #21233344"
5757 }
5858
@@ -63,30 +63,30 @@ class HexColorCodeScalarTest extends Specification {
6363 then :
6464 result. isEqualTo(expectedValue)
6565 where :
66- input | expectedValue
67- " #ff0000" | new StringValue (" #ff0000" )
68- " #123" | new StringValue (" #112233" )
69- " #11223344" | new StringValue (" #11223344" )
70- " #1234" | new StringValue (" #11223344" )
71- mkColor(0x21 , 0x23 , 0x33 ) | new StringValue (" #212333" )
66+ input | expectedValue
67+ " #ff0000" | new StringValue (" #ff0000" )
68+ " #123" | new StringValue (" #112233" )
69+ " #11223344" | new StringValue (" #11223344" )
70+ " #1234" | new StringValue (" #11223344" )
71+ mkColor(0x21 , 0x23 , 0x33 ) | new StringValue (" #212333" )
7272 mkColor(0x21 , 0x23 , 0x33 , 0x44 ) | new StringValue (" #21233344" )
7373 }
7474
7575 @Unroll
76- def " parseValue throws exception for invalid input #value " () {
76+ def " parseValue throws exception for invalid input #input " () {
7777 when :
7878 def result = coercing. parseValue(input)
7979 then :
8080 thrown(CoercingParseValueException )
8181 where :
82- input | _
83- " ff000" | _
84- " " | _
85- " not a hex code" | _
86- " 42.3" | _
87- new Double (42.3 ) | _
88- new Float (42.3 ) | _
89- new Object () | _
82+ input | _
83+ " ff000" | _
84+ " " | _
85+ " not a hex code" | _
86+ " 42.3" | _
87+ Double . valueOf (42.3 ) | _
88+ Float . valueOf (42.3 ) | _
89+ new Object () | _
9090 }
9191
9292}
0 commit comments