Skip to content

Commit 2ddfe36

Browse files
author
Jack Shannon
committed
added tests for type-stability
1 parent da5ae68 commit 2ddfe36

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/multinomials.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@ using LinearAlgebra
2525
@test [multiexponents(2, 2)...] == [[2, 0], [1, 1], [0, 2]]
2626
@test [multiexponents(3, 3)...] == [[3, 0, 0], [2, 1, 0], [2, 0, 1], [1, 2, 0], [1, 1, 1], [1, 0, 2], [0, 3, 0], [0, 2, 1], [0, 1, 2], [0, 0, 3]]
2727

28+
# type-stability
29+
@test typeof([multiexponents(1, 1)...]) == typeof([[1]])
30+
@test eltype(multiexponents(1, 1)) == eltype([[1]])
2831
end

0 commit comments

Comments
 (0)