Skip to content

Commit 500b89f

Browse files
fix alloc tests
1 parent 3cd098a commit 500b89f

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

test/basic.jl

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -332,17 +332,19 @@ test_apply_noalloc(H, du, u, p, t) = @test_broken (@allocations apply_op!(H, du,
332332
p == 0.1,)
333333
t = 0.1
334334

335-
# Test allocations with original interface
336-
@allocations apply_op!(H_sparse, du, u, p, t) # warmup
337-
@allocations apply_op!(H_dense, du, u, p, t) # warmup
338-
test_apply_noalloc(H_sparse, du, u, p, t)
339-
test_apply_noalloc(H_dense, du, u, p, t)
340-
341-
# Test allocations with new interface
342-
@allocations apply_op_new!(H_sparse, du, v, u, p, t) # warmup
343-
@allocations apply_op_new!(H_dense, du, v, u, p, t) # warmup
344-
test_apply_noalloc_new(H_sparse, du, v, u, p, t)
345-
test_apply_noalloc_new(H_dense, du, v, u, p, t)
335+
if VERSION >= v"1.11"
336+
# Test allocations with original interface
337+
@allocations apply_op!(H_sparse, du, u, p, t) # warmup
338+
@allocations apply_op!(H_dense, du, u, p, t) # warmup
339+
test_apply_noalloc(H_sparse, du, u, p, t)
340+
test_apply_noalloc(H_dense, du, u, p, t)
341+
342+
# Test allocations with new interface
343+
@allocations apply_op_new!(H_sparse, du, v, u, p, t) # warmup
344+
@allocations apply_op_new!(H_dense, du, v, u, p, t) # warmup
345+
test_apply_noalloc_new(H_sparse, du, v, u, p, t)
346+
test_apply_noalloc_new(H_dense, du, v, u, p, t)
347+
end
346348
end
347349
end
348350

0 commit comments

Comments
 (0)