Skip to content

Commit 9201896

Browse files
committed
Update test and add check file
1 parent f702773 commit 9201896

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

tests/run/planets.check

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Your weight on MERCURY is 37.775761520093525
2+
Your weight on SATURN is 106.60155388115666
3+
Your weight on VENUS is 90.49990998410455
4+
Your weight on URANUS is 90.51271993894251
5+
Your weight on EARTH is 100.0
6+
Your weight on NEPTUNE is 113.83280724696579
7+
Your weight on MARS is 37.873718403712886
8+
Your weight on JUPITER is 253.05575254957407

tests/run/planets.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ object Test {
1818
import Planet._
1919
assert(enumValueNamed("SATURN") == SATURN)
2020
assert(enumValue(2) == EARTH)
21-
val earthWeight = args(0).toDouble
21+
val earthWeight = 100
2222
val mass = earthWeight/EARTH.surfaceGravity
2323
for (p <- enumValues)
2424
println(s"Your weight on $p is ${p.surfaceWeight(mass)}")

0 commit comments

Comments
 (0)