Sha256: 0cc3937b9424046ed48b5a14bc0be9af2357ce62e49dd9185869a2caff125edc

Contents?: true

Size: 1.31 KB

Versions: 164

Compression:

Stored size: 1.31 KB

Contents

import org.scalatest._

class SpaceAgeTest extends FunSuite with Matchers {
  test ("age in seconds") {
    val age = SpaceAge(1000000)
    age.seconds should be (1000000)
  }

  test ("age in earth years") {
    pending
    val age = SpaceAge(1000000000)
    age.onEarth should be (31.69)
  }

  test ("age in mercury years") {
    pending
    val age = SpaceAge(2134835688)
    age.onEarth should be (67.65)
    age.onMercury should be (280.88)
  }

  test ("age in venus years") {
    pending
    val age = SpaceAge(189839836)
    age.onEarth should be (6.02)
    age.onVenus should be (9.78)
  }

  test ("age on mars") {
    pending
    val age = SpaceAge(2329871239L)
    age.onEarth should be (73.83)
    age.onMars should be (39.25)
  }

  test ("age on jupiter") {
    pending
    val age = SpaceAge(901876382)
    age.onEarth should be (28.58)
    age.onJupiter should be (2.41)
  }

  test ("age on saturn") {
    pending
    val age = SpaceAge(3000000000L)
    age.onEarth should be (95.06)
    age.onSaturn should be (3.23)
  }

  test ("age on uranus") {
    pending
    val age = SpaceAge(3210123456L)
    age.onEarth should be (101.72)
    age.onUranus should be (1.21)
  }

  test ("age on neptune") {
    pending
    val age = SpaceAge(8210123456L)
    age.onEarth should be (260.16)
    age.onNeptune should be (1.58)
  }
}

Version data entries

164 entries across 164 versions & 1 rubygems

Version Path
trackler-2.2.1.20 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.19 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.18 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.17 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.16 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.15 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.14 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.13 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.12 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.11 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.10 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.9 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.8 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.7 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.6 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.5 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.4 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.3 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.2 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.2.1.1 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala