File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
core-kotlin-modules/core-kotlin-numbers-2/src/test/kotlin/com/baeldung/intToFloat Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,30 +9,30 @@ import java.util.*
9
9
class IntToFloatUnitTest {
10
10
11
11
@Test
12
- fun testConvertIntToFloatUsingToFloat () {
12
+ fun `convert int to float using toFloat() method` () {
13
13
val intValue = 12
14
14
val floatValue = intValue.toFloat()
15
15
16
16
assertEquals(12.0f , floatValue)
17
17
}
18
18
19
19
@Test
20
- fun testConvertIntToFloatUsingArithmetic () {
20
+ fun `convert int to float using arithmetic` () {
21
21
val intValue = 12
22
22
val floatValue = intValue + 0.0f
23
23
24
24
assertEquals(12.0f , floatValue)
25
25
}
26
26
27
27
@Test
28
- fun testConvertIntToFloatUsingNumberFormat () {
28
+ fun `convert int to float using NumberFormat class` () {
29
29
val intValue = 12
30
30
val floatValue = convertIntToFloatUsingNumberFormat(intValue)
31
31
assertEquals(12.0f , floatValue)
32
32
}
33
33
34
34
@Test
35
- fun testConvertIntToFloatUsingBigDecimal () {
35
+ fun `convert int to float using BigDecimal` () {
36
36
val intValue = 12
37
37
val floatValue = BigDecimal (intValue).toFloat()
38
38
You can’t perform that action at this time.
0 commit comments