Skip to content

Commit

Permalink
Add docstring test
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jul 1, 2020
1 parent db7c8fe commit 3a027ac
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/test_classes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ using Classes
@test isclass(AbstractClass) == false # not concrete
@test isclass(Int) == false # not <: AbstractClass

"""
Foo
A test class
"""
@class Foo begin
foo::Int

Expand All @@ -20,6 +25,10 @@ end

@test classof(AbstractFoo) == Foo
@test classof(Foo) == Foo
@test string(@doc(Foo)) == """Foo
A test class
"""

@test superclass(Foo) == Class
@test_throws Exception superclass(AbstractFoo)
Expand Down Expand Up @@ -157,4 +166,4 @@ obj = AbstractLog{Float64}([1. 2.; 3. 4.])
# function (ParameterizedSub{T3, T4}(one::T1, two::T2, x::Float64, y::Float64; )::Any) where {T3 <: TupleHolder, T4 <: TupleHolder}
# #= /Users/rjp/.julia/packages/MacroTools/4AjBS/src/utils.jl:302 =#
# new{T3, T4}(one, two, x, y)
# end
# end

0 comments on commit 3a027ac

Please sign in to comment.