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.1.0.2 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.1.0.1 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.1.0.0 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.55 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.54 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.53 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.52 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.51 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.50 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.49 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.48 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.47 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.46 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.45 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.44 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.43 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.42 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.41 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.40 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala
trackler-2.0.8.39 tracks/scala/exercises/space-age/src/test/scala/SpaceAgeTest.scala