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