File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ object Implicits extends FlatSpec with Matchers with org.scalaexercises.definiti
105
105
def asDefaultImplicits (res0 : BigDecimal ) {
106
106
def howMuchCanIMake_? (hours : Int )(implicit dollarsPerHour : BigDecimal ) = dollarsPerHour * hours
107
107
108
- implicit val hourlyRate = BigDecimal (34.00 )
108
+ implicit val hourlyRate = BigDecimal (34 )
109
109
110
110
howMuchCanIMake_?(30 ) should be(res0)
111
111
}
@@ -116,7 +116,7 @@ object Implicits extends FlatSpec with Matchers with org.scalaexercises.definiti
116
116
def howMuchCanIMake_? (hours : Int )(implicit amount : BigDecimal , currencyName : String ) =
117
117
(amount * hours).toString() + " " + currencyName
118
118
119
- implicit val hourlyRate = BigDecimal (34.00 )
119
+ implicit val hourlyRate = BigDecimal (34 )
120
120
implicit val currencyName = " Dollars"
121
121
122
122
howMuchCanIMake_?(30 ) should be(res0)
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class ImplicitsSpec extends Spec with Checkers {
35
35
}
36
36
37
37
def `implicits for default parameters` = {
38
- val fstAnswer : BigDecimal = 1020.0f
38
+ val fstAnswer : BigDecimal = 1020
39
39
40
40
check(
41
41
Test .testSuccess(
@@ -49,7 +49,7 @@ class ImplicitsSpec extends Spec with Checkers {
49
49
check(
50
50
Test .testSuccess(
51
51
Implicits .listOfImplicitsImplicits _,
52
- " 1020.0 Dollars" :: HNil
52
+ " 1020 Dollars" :: HNil
53
53
)
54
54
)
55
55
}
You can’t perform that action at this time.
0 commit comments