Sha256: 5ecd7851c3494571aa065b136aec7031f0c32728338da7faddfb51d7dd21f3ee
Contents?: true
Size: 747 Bytes
Versions: 107
Compression:
Stored size: 747 Bytes
Contents
import org.scalatest.{Matchers, FunSuite} /** @version 1.0.0 */ class PascalsTriangleTest extends FunSuite with Matchers { test("zero rows") { PascalsTriangle.rows(0) should be (List()) } test("single row") { pending PascalsTriangle.rows(1) should be (List(List(1))) } test("two rows") { pending PascalsTriangle.rows(2) should be (List(List(1), List(1, 1))) } test("three rows") { pending PascalsTriangle.rows(3) should be (List(List(1), List(1, 1), List(1, 2, 1))) } test("four rows") { pending PascalsTriangle.rows(4) should be (List(List(1), List(1, 1), List(1, 2, 1), List(1, 3, 3, 1))) } test("negative rows") { pending PascalsTriangle.rows(-1) should be (List()) } }
Version data entries
107 entries across 107 versions & 1 rubygems