Sha256: 67b2097686baef72f1383a82177cc5da0735ac8b93b85aa5481e879e9ac0d8f2

Contents?: true

Size: 735 Bytes

Versions: 62

Compression:

Stored size: 735 Bytes

Contents

import org.scalatest.{Matchers, FunSuite}

/** @version 1.1.1 */
class CollatzConjectureTest extends FunSuite with Matchers {
  
  test("zero steps for one") {
    CollatzConjecture.steps(1) should be (Some(0))
  }

  test("divide if even") {
    pending
    CollatzConjecture.steps(16) should be (Some(4))
  }

  test("even and odd steps") {
    pending
    CollatzConjecture.steps(12) should be (Some(9))
  }

  test("Large number of even and odd steps") {
    pending
    CollatzConjecture.steps(1000000) should be (Some(152))
  }

  test("zero is an error") {
    pending
    CollatzConjecture.steps(0) should be (None)
  }

  test("negative value is an error") {
    pending
    CollatzConjecture.steps(-15) should be (None)
  }
}

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
trackler-2.2.1.106 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.105 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.104 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.103 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.102 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.101 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.100 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.99 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.98 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.97 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.96 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.95 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.94 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.93 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.92 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.91 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.90 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.89 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.88 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala
trackler-2.2.1.87 tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala