Sha256: d899c941f25b27117ce686b626f3ee8ee5f0ebb7d40c17f9cbdda2767db2c0a3

Contents?: true

Size: 278 Bytes

Versions: 289

Compression:

Stored size: 278 Bytes

Contents

using Base.Test

include("pascals-triangle.jl")

rows = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]]

@testset "$i row(s)" for i in 1:4
    @test triangle(i) == rows[1:i]
end

@testset "special cases" begin
    @test_throws DomainError triangle(-1)
    @test isempty(triangle(0))
end

Version data entries

289 entries across 289 versions & 1 rubygems

Version Path
trackler-2.1.0.41 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.40 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.39 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.38 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.37 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.36 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.34 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.33 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.32 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.31 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.30 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.29 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.28 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.27 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.26 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.25 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.24 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.23 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.22 tracks/julia/exercises/pascals-triangle/runtests.jl
trackler-2.1.0.21 tracks/julia/exercises/pascals-triangle/runtests.jl