Skip to content

Commit 3f01acd

Browse files
committed
Only run test_throws on updated Julia versions
1 parent f31c4a4 commit 3f01acd

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/test_initial_errors.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ using Zygote
55
# Before defining OperatorEnum, calling the implicit (deprecated)
66
# syntax should fail:
77
tree = Node(; feature=1)
8-
@test_throws ErrorException tree([1.0 2.0]')
9-
@test_throws "Please use the " tree([1.0 2.0]')
10-
@test_throws ErrorException tree'([1.0 2.0]')
11-
@test_throws "Please use the " tree'([1.0 2.0]')
8+
9+
if VERSION >= v"1.8"
10+
@test_throws ErrorException tree([1.0 2.0]')
11+
@test_throws "Please use the " tree([1.0 2.0]')
12+
@test_throws ErrorException tree'([1.0 2.0]')
13+
@test_throws "Please use the " tree'([1.0 2.0]')
14+
end
1215

1316
@test string(tree) == "x1"
1417
@test string(Node(1, tree)) == "unary_operator[1](x1)"

0 commit comments

Comments
 (0)