aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run/planets.check8
-rw-r--r--tests/run/planets.scala2
2 files changed, 9 insertions, 1 deletions
diff --git a/tests/run/planets.check b/tests/run/planets.check
new file mode 100644
index 000000000..feb6f737d
--- /dev/null
+++ b/tests/run/planets.check
@@ -0,0 +1,8 @@
+Your weight on MERCURY is 37.775761520093525
+Your weight on SATURN is 106.60155388115666
+Your weight on VENUS is 90.49990998410455
+Your weight on URANUS is 90.51271993894251
+Your weight on EARTH is 100.0
+Your weight on NEPTUNE is 113.83280724696579
+Your weight on MARS is 37.873718403712886
+Your weight on JUPITER is 253.05575254957407
diff --git a/tests/run/planets.scala b/tests/run/planets.scala
index 2fff01edc..bcbfd7eeb 100644
--- a/tests/run/planets.scala
+++ b/tests/run/planets.scala
@@ -18,7 +18,7 @@ object Test {
import Planet._
assert(enumValueNamed("SATURN") == SATURN)
assert(enumValue(2) == EARTH)
- val earthWeight = args(0).toDouble
+ val earthWeight = 100
val mass = earthWeight/EARTH.surfaceGravity
for (p <- enumValues)
println(s"Your weight on $p is ${p.surfaceWeight(mass)}")