@@ -10,13 +10,13 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
10
10
child_nodes = children (node)
11
11
12
12
# Check for various syntax errors
13
- if length (child_nodes)== 1
13
+ if length (child_nodes) == 1
14
14
push! (testerrors, (message= " Your @testitem is missing a name and code block." , range= testitem_range))
15
15
return
16
- elseif length (child_nodes)> 1 && ! (kind (child_nodes[2 ]) == K " string" )
16
+ elseif length (child_nodes) > 1 && ! (kind (child_nodes[2 ]) == K " string" )
17
17
push! (testerrors, (message= " Your @testitem must have a first argument that is of type String for the name." , range= testitem_range))
18
18
return
19
- elseif length (child_nodes)== 2
19
+ elseif length (child_nodes) == 2
20
20
push! (testerrors, (message= " Your @testitem is missing a code block argument." , range= testitem_range))
21
21
return
22
22
elseif ! (kind (child_nodes[end ]) == K " block" )
@@ -32,10 +32,10 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
32
32
if kind (i) != K " ="
33
33
push! (testerrors, (message= " The arguments to a @testitem must be in keyword format." , range= testitem_range))
34
34
return
35
- elseif ! (length (children (i))== 2 )
35
+ elseif ! (length (children (i)) == 2 )
36
36
error (" This code path should not be possible." )
37
37
elseif kind (i[1 ]) == K " Identifier" && i[1 ]. val == :tags
38
- if option_tags!= = nothing
38
+ if option_tags != = nothing
39
39
push! (testerrors, (message= " The keyword argument tags cannot be specified more than once." , range= testitem_range))
40
40
return
41
41
end
@@ -68,7 +68,7 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
68
68
69
69
option_default_imports = i[2 ]. val
70
70
elseif kind (i[1 ]) == K " Identifier" && i[1 ]. val == :setup
71
- if option_setup!= = nothing
71
+ if option_setup != = nothing
72
72
push! (testerrors, (message= " The keyword argument setup cannot be specified more than once." , range= testitem_range))
73
73
return
74
74
end
@@ -94,15 +94,15 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
94
94
end
95
95
end
96
96
97
- if option_tags=== nothing
97
+ if option_tags === nothing
98
98
option_tags = Symbol[]
99
99
end
100
100
101
- if option_default_imports=== nothing
101
+ if option_default_imports === nothing
102
102
option_default_imports = true
103
103
end
104
104
105
- if option_setup=== nothing
105
+ if option_setup === nothing
106
106
option_setup = Symbol[]
107
107
end
108
108
@@ -114,8 +114,8 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
114
114
end
115
115
116
116
push! (testitems,
117
- (
118
- name= node[2 ,1 ]. val,
117
+ (
118
+ name= node[2 , 1 ]. val,
119
119
range= testitem_range,
120
120
code_range= code_range,
121
121
option_default_imports= option_default_imports,
@@ -132,13 +132,13 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
132
132
child_nodes = children (node)
133
133
134
134
# Check for various syntax errors
135
- if length (child_nodes)== 1
135
+ if length (child_nodes) == 1
136
136
push! (testerrors, (message= " Your $testkind is missing a name and code block." , range= testitem_range))
137
137
return
138
- elseif length (child_nodes)> 1 && ! (kind (child_nodes[2 ]) == K " Identifier" )
138
+ elseif length (child_nodes) > 1 && ! (kind (child_nodes[2 ]) == K " Identifier" )
139
139
push! (testerrors, (message= " Your $testkind must have a first argument that is an identifier for the name." , range= testitem_range))
140
140
return
141
- elseif length (child_nodes)== 2
141
+ elseif length (child_nodes) == 2
142
142
push! (testerrors, (message= " Your $testkind is missing a code block argument." , range= testitem_range))
143
143
return
144
144
elseif ! (kind (child_nodes[end ]) == K " block" )
@@ -150,7 +150,7 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
150
150
if kind (i) != K " ="
151
151
push! (testerrors, (message= " The arguments to a $testkind must be in keyword format." , range= testitem_range))
152
152
return
153
- elseif ! (length (children (i))== 2 )
153
+ elseif ! (length (children (i)) == 2 )
154
154
error (" This code path should not be possible." )
155
155
else
156
156
push! (testerrors, (message= " Unknown keyword argument." , range= testitem_range))
@@ -166,9 +166,9 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
166
166
(first (our_range (code_block))+ 5 ): (last (our_range (code_block))- 3 )
167
167
end
168
168
169
- testkind2 = if testkind== Symbol (" @testmodule" )
169
+ testkind2 = if testkind == Symbol (" @testmodule" )
170
170
:module
171
- elseif testkind== Symbol (" @testsnippet" )
171
+ elseif testkind == Symbol (" @testsnippet" )
172
172
:snippet
173
173
else
174
174
error (" Unknown testkind" )
0 commit comments