You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
push!(testerrors, (name="Test definition error", message="Your @testitem must have a first argument that is of type String for the name.", range=testitem_range))
push!(testerrors, (name="Test definition error", message="Your @testitem must have a first argument that is of type String for the name.", range=testitem_range))
18
18
return
19
-
elseiflength(child_nodes)==2
20
-
push!(testerrors, (name=node[2,1].val, message="Your @testitem is missing a code block argument.", range=testitem_range))
19
+
elseiflength(child_nodes)==2
20
+
push!(testerrors, (name=node[2,1].val, message="Your @testitem is missing a code block argument.", range=testitem_range))
21
21
return
22
22
elseif!(kind(child_nodes[end]) ==K"block")
23
-
push!(testerrors, (name=node[2,1].val, message="The final argument of a @testitem must be a begin end block.", range=testitem_range))
23
+
push!(testerrors, (name=node[2,1].val, message="The final argument of a @testitem must be a begin end block.", range=testitem_range))
24
24
return
25
25
else
26
26
option_tags =nothing
@@ -30,79 +30,79 @@ function find_test_detail!(node, testitems, testsetups, testerrors)
30
30
# Now check our keyword args
31
31
for i in child_nodes[3:end-1]
32
32
ifkind(i) !=K"="
33
-
push!(testerrors, (name=node[2,1].val, message="The arguments to a @testitem must be in keyword format.", range=testitem_range))
33
+
push!(testerrors, (name=node[2,1].val, message="The arguments to a @testitem must be in keyword format.", range=testitem_range))
push!(testerrors, (name=node[2,1].val, message="The keyword argument setup cannot be specified more than once.", range=testitem_range))
71
+
if option_setup!==nothing
72
+
push!(testerrors, (name=node[2,1].val, message="The keyword argument setup cannot be specified more than once.", range=testitem_range))
73
73
return
74
74
end
75
75
76
76
ifkind(i[2]) !=K"vect"
77
-
push!(testerrors, (name=node[2,1].val, message="The keyword argument `setup` only accepts a vector of `@testsetup module` names.", range=testitem_range))
77
+
push!(testerrors, (name=node[2,1].val, message="The keyword argument `setup` only accepts a vector of `@testsetup module` names.", range=testitem_range))
78
78
return
79
79
end
80
80
81
81
option_setup = Symbol[]
82
82
83
83
for j inchildren(i[2])
84
84
ifkind(j) !=K"Identifier"
85
-
push!(testerrors, (name=node[2,1].val, message="The keyword argument `setup` only accepts a vector of `@testsetup module` names.", range=testitem_range))
85
+
push!(testerrors, (name=node[2,1].val, message="The keyword argument `setup` only accepts a vector of `@testsetup module` names.", range=testitem_range))
push!(testerrors, (name="Test definition error", message="Your $testkind must have a first argument that is an identifier for the name.", range=testitem_range))
push!(testerrors, (name="Test definition error", message="Your $testkind must have a first argument that is an identifier for the name.", range=testitem_range))
140
140
return
141
-
elseiflength(child_nodes)==2
142
-
push!(testerrors, (name=child_nodes[2].val, message="Your $testkind is missing a code block argument.", range=testitem_range))
141
+
elseiflength(child_nodes)==2
142
+
push!(testerrors, (name=child_nodes[2].val, message="Your $testkind is missing a code block argument.", range=testitem_range))
143
143
return
144
144
elseif!(kind(child_nodes[end]) ==K"block")
145
-
push!(testerrors, (name=child_nodes[2].val, message="The final argument of a $testkind must be a begin end block.", range=testitem_range))
145
+
push!(testerrors, (name=child_nodes[2].val, message="The final argument of a $testkind must be a begin end block.", range=testitem_range))
146
146
return
147
147
else
148
148
# Now check our keyword args
149
149
for i in child_nodes[3:end-1]
150
150
ifkind(i) !=K"="
151
-
push!(testerrors, (name=child_nodes[2].val, message="The arguments to a $testkind must be in keyword format.", range=testitem_range))
151
+
push!(testerrors, (name=child_nodes[2].val, message="The arguments to a $testkind must be in keyword format.", range=testitem_range))
0 commit comments