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 @@ -103,7 +103,7 @@ object Implicits extends FlatSpec with Matchers with org.scalaexercises.definiti
103
103
def asDefaultImplicits (res0 : BigDecimal ) {
104
104
def howMuchCanIMake_? (hours : Int )(implicit dollarsPerHour : BigDecimal ) = dollarsPerHour * hours
105
105
106
- implicit val hourlyRate = BigDecimal (34.00 )
106
+ implicit val hourlyRate = BigDecimal (34 )
107
107
108
108
howMuchCanIMake_?(30 ) should be(res0)
109
109
}
@@ -114,7 +114,7 @@ object Implicits extends FlatSpec with Matchers with org.scalaexercises.definiti
114
114
def howMuchCanIMake_? (hours : Int )(implicit amount : BigDecimal , currencyName : String ) =
115
115
(amount * hours).toString() + " " + currencyName
116
116
117
- implicit val hourlyRate = BigDecimal (34.00 )
117
+ implicit val hourlyRate = BigDecimal (34 )
118
118
implicit val currencyName = " Dollars"
119
119
120
120
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