Skip to content

Commit 24c4bd6

Browse files
committed
test: new error message for empty operators
1 parent acf3dbc commit 24c4bd6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/test_expressions.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,13 @@ end
226226

227227
@testitem "Miscellaneous expression calls" begin
228228
using DynamicExpressions
229+
using DynamicExpressions: get_tree, get_operators
229230

230231
ex = @parse_expression(x1 + 1.5, binary_operators = [+], variable_names = ["x1"])
231232
@test DynamicExpressions.ExpressionModule.node_type(ex) <: Node
232233

233234
@test !isempty(ex)
235+
236+
tree = get_tree(ex)
237+
@test_throws ArgumentError get_operators(tree, nothing)
234238
end

0 commit comments

Comments
 (0)