@@ -5,13 +5,13 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
5
5
child_nodes = children (node)
6
6
7
7
# Check for various syntax errors
8
- if length (child_nodes)== 1
8
+ if length (child_nodes) == 1
9
9
push! (testerrors, (message= " Your @testitem is missing a name and code block." , range= testitem_range))
10
10
return
11
- elseif length (child_nodes)> 1 && ! (kind (child_nodes[2 ]) == K " string" )
11
+ elseif length (child_nodes) > 1 && ! (kind (child_nodes[2 ]) == K " string" )
12
12
push! (testerrors, (message= " Your @testitem must have a first argument that is of type String for the name." , range= testitem_range))
13
13
return
14
- elseif length (child_nodes)== 2
14
+ elseif length (child_nodes) == 2
15
15
push! (testerrors, (message= " Your @testitem is missing a code block argument." , range= testitem_range))
16
16
return
17
17
elseif ! (kind (child_nodes[end ]) == K " block" )
@@ -27,10 +27,10 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
27
27
if kind (i) != K " ="
28
28
push! (testerrors, (message= " The arguments to a @testitem must be in keyword format." , range= testitem_range))
29
29
return
30
- elseif ! (length (children (i))== 2 )
30
+ elseif ! (length (children (i)) == 2 )
31
31
error (" This code path should not be possible." )
32
32
elseif kind (i[1 ]) == K " Identifier" && i[1 ]. val == :tags
33
- if option_tags!= = nothing
33
+ if option_tags != = nothing
34
34
push! (testerrors, (message= " The keyword argument tags cannot be specified more than once." , range= testitem_range))
35
35
return
36
36
end
@@ -63,7 +63,7 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
63
63
64
64
option_default_imports = i[2 ]. val
65
65
elseif kind (i[1 ]) == K " Identifier" && i[1 ]. val == :setup
66
- if option_setup!= = nothing
66
+ if option_setup != = nothing
67
67
push! (testerrors, (message= " The keyword argument setup cannot be specified more than once." , range= testitem_range))
68
68
return
69
69
end
@@ -89,15 +89,15 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
89
89
end
90
90
end
91
91
92
- if option_tags=== nothing
92
+ if option_tags === nothing
93
93
option_tags = Symbol[]
94
94
end
95
95
96
- if option_default_imports=== nothing
96
+ if option_default_imports === nothing
97
97
option_default_imports = true
98
98
end
99
99
100
- if option_setup=== nothing
100
+ if option_setup === nothing
101
101
option_setup = Symbol[]
102
102
end
103
103
@@ -109,8 +109,8 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
109
109
end
110
110
111
111
push! (testitems,
112
- (
113
- name= node[2 ,1 ]. val,
112
+ (
113
+ name= node[2 , 1 ]. val,
114
114
range= testitem_range,
115
115
code_range= code_range,
116
116
option_default_imports= option_default_imports,
@@ -127,13 +127,13 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
127
127
child_nodes = children (node)
128
128
129
129
# Check for various syntax errors
130
- if length (child_nodes)== 1
130
+ if length (child_nodes) == 1
131
131
push! (testerrors, (message= " Your $testkind is missing a name and code block." , range= testitem_range))
132
132
return
133
- elseif length (child_nodes)> 1 && ! (kind (child_nodes[2 ]) == K " Identifier" )
133
+ elseif length (child_nodes) > 1 && ! (kind (child_nodes[2 ]) == K " Identifier" )
134
134
push! (testerrors, (message= " Your $testkind must have a first argument that is an identifier for the name." , range= testitem_range))
135
135
return
136
- elseif length (child_nodes)== 2
136
+ elseif length (child_nodes) == 2
137
137
push! (testerrors, (message= " Your $testkind is missing a code block argument." , range= testitem_range))
138
138
return
139
139
elseif ! (kind (child_nodes[end ]) == K " block" )
@@ -145,7 +145,7 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
145
145
if kind (i) != K " ="
146
146
push! (testerrors, (message= " The arguments to a $testkind must be in keyword format." , range= testitem_range))
147
147
return
148
- elseif ! (length (children (i))== 2 )
148
+ elseif ! (length (children (i)) == 2 )
149
149
error (" This code path should not be possible." )
150
150
else
151
151
push! (testerrors, (message= " Unknown keyword argument." , range= testitem_range))
@@ -161,9 +161,9 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
161
161
(first (range (code_block))+ 5 ): (last (range (code_block))- 3 )
162
162
end
163
163
164
- testkind2 = if testkind== Symbol (" @testmodule" )
164
+ testkind2 = if testkind == Symbol (" @testmodule" )
165
165
:module
166
- elseif testkind== Symbol (" @testsnippet" )
166
+ elseif testkind == Symbol (" @testsnippet" )
167
167
:snippet
168
168
else
169
169
error (" Unknown testkind" )
0 commit comments