Sha256: 534564f2e66ad35fd10035f334dd7b4e831f2462cd98fe0effe4196abeaee7d7
Contents?: true
Size: 847 Bytes
Versions: 108
Compression:
Stored size: 847 Bytes
Contents
import org.scalatest.{Matchers, FunSuite} /** @version 1.0.0 */ class PrimeFactorsTest extends FunSuite with Matchers { test("no factors") { PrimeFactors.factors(1) should be (List()) } test("prime number") { pending PrimeFactors.factors(2) should be (List(2)) } test("square of a prime") { pending PrimeFactors.factors(9) should be (List(3, 3)) } test("cube of a prime") { pending PrimeFactors.factors(8) should be (List(2, 2, 2)) } test("product of primes and non-primes") { pending PrimeFactors.factors(12) should be (List(2, 2, 3)) } test("product of primes") { pending PrimeFactors.factors(901255) should be (List(5, 17, 23, 461)) } test("factors include a large prime") { pending PrimeFactors.factors(93819012551l) should be (List(11, 9539, 894119)) } }
Version data entries
108 entries across 108 versions & 1 rubygems