Skip to content

Commit

Permalink
Merge pull request #25 from swadey/cjf/testset-tweak
Browse files Browse the repository at this point in the history
Cleanup: put tests in testsets
  • Loading branch information
c42f authored Jun 11, 2019
2 parents 40d4ba3 + 3856325 commit ae8c0e5
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ end

#-------------------------------------------------------------------------------
lisp"(import ParserCombinator)"
@test lisp"(@E_str \"S\")" == E"S"
@testset "Module import" begin
@test lisp"(@E_str \"S\")" == E"S"
end

#-------------------------------------------------------------------------------
@testset "Include from file" begin
Expand All @@ -265,19 +267,19 @@ lisp"(import ParserCombinator)"
@test !isdefined(@__MODULE__, :not_a_global)
end

# ----------------------------------------------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Bug reports
# ----------------------------------------------------------------------------------------------------------------------
@test lisp"""(def game_map (Dict
(=> 'living_room
'((you are in the living room
of a wizards house - there is a wizard
snoring loudly on the couch -)
(west door garden)
(upstairs stairway attic)))))""" == Dict(:living_room =>
Any[ Any[ :you, :are, :in, :the, :living, :room, :of, :a, :wizards, :house, :-,
:there, :is, :a, :wizard, :snoring, :loudly, :on, :the, :couch, :- ],
Any[ :west, :door, :garden ],
Any[ :upstairs, :stairway, :attic ] ])


@testset "Bug reports" begin
@test lisp"""(def game_map (Dict
(=> 'living_room
'((you are in the living room
of a wizards house - there is a wizard
snoring loudly on the couch -)
(west door garden)
(upstairs stairway attic)))))""" ==
Dict(:living_room =>
Any[ Any[ :you, :are, :in, :the, :living, :room, :of, :a, :wizards, :house, :-,
:there, :is, :a, :wizard, :snoring, :loudly, :on, :the, :couch, :- ],
Any[ :west, :door, :garden ],
Any[ :upstairs, :stairway, :attic ] ])
end

0 comments on commit ae8c0e5

Please sign in to comment.