@@ -7,11 +7,28 @@ using JuliaSyntax: GreenNode, SyntaxNode,
77 flags, EMPTY_FLAGS, TRIVIA_FLAG, INFIX_FLAG,
88 children, child, setchild!, SyntaxHead
99
10+ include (" test_utils.jl" )
11+ # Tests for the test_utils go here to allow the utils to be included on their
12+ # own without invoking the tests.
13+ @testset " Test tools" begin
14+ @test exprs_roughly_equal (Expr (:global , :x , :y ),
15+ Expr (:global , Expr (:tuple , :x , :y )))
16+ @test exprs_roughly_equal (Expr (:local , :x , :y ),
17+ Expr (:local , Expr (:tuple , :x , :y )))
18+ @test exprs_roughly_equal (1.5 ,
19+ Expr (:call , :* , 1.5 , :f ))
20+ @test exprs_roughly_equal (1.5 ,
21+ Expr (:call , :* , 1.5 , :f0 ))
22+ @test exprs_roughly_equal (Expr (:do , Expr (:macrocall , Symbol (" @f" ), LineNumberNode (1 ), Expr (:kw , :a , 1 )),
23+ Expr (:-> , Expr (:tuple ), Expr (:block , LineNumberNode (1 )))),
24+ Expr (:do , Expr (:macrocall , Symbol (" @f" ), LineNumberNode (1 ), Expr (:(= ), :a , 1 )),
25+ Expr (:-> , Expr (:tuple ), Expr (:block , LineNumberNode (1 )))))
26+ end
27+
1028@testset " Tokenize" begin
1129 include (" tokenize.jl" )
1230end
1331
14- include (" test_utils.jl" )
1532include (" parse_stream.jl" )
1633include (" parser.jl" )
1734include (" diagnostics.jl" )
0 commit comments