@@ -7,11 +7,28 @@ using JuliaSyntax: GreenNode, SyntaxNode,
7
7
flags, EMPTY_FLAGS, TRIVIA_FLAG, INFIX_FLAG,
8
8
children, child, setchild!, SyntaxHead
9
9
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
+
10
28
@testset " Tokenize" begin
11
29
include (" tokenize.jl" )
12
30
end
13
31
14
- include (" test_utils.jl" )
15
32
include (" parse_stream.jl" )
16
33
include (" parser.jl" )
17
34
include (" diagnostics.jl" )
0 commit comments