Skip to content

Commit 121bc7f

Browse files
committed
add tests
1 parent 06074a8 commit 121bc7f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/runtests.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import SparseArrays
55

66
module Fruit
77

8-
struct RedApple end
8+
struct RedApple{T}
9+
x::T
10+
end
911

1012
end
1113

@@ -15,6 +17,8 @@ import .Fruit
1517
## HELPERS
1618

1719
@testset "typename" begin
20+
@test StatisticalTraits.typename(Fruit.RedApple) == :RedApple
21+
@test StatisticalTraits.typename(Fruit.RedApple{Int}) == :RedApple
1822
@test StatisticalTraits.typename(Nothing) == :Nothing
1923
@test StatisticalTraits.typename(UnionAll) == :UnionAll
2024
@test StatisticalTraits.typename(Union{Char,Int}) ==
@@ -28,6 +32,7 @@ end
2832
"anthony_blaoms_pet_elk"
2933
@test StatisticalTraits.snakecase("TheLASERBeam", delim=' ') ==
3034
"the laser beam"
35+
@test StatisticalTraits.snakecase(:TheLASERBeam) == :the_laser_beam
3136
end
3237

3338

0 commit comments

Comments
 (0)