@@ -355,20 +355,23 @@ end
355355 @test deserialized == data
356356end
357357
358- @vars x y
359- a = Basic ()
360- @testset " non-allocating(ish) methods" begin
361- sin (x), cos (x), abs (x)
362- x^ x, x + x, x* x, x- x, x/ x # warm up
363-
364- @test (@allocations SymEngine. sin! (a,x)) == 0
365- @test (@allocations SymEngine. cos! (a,x)) == 0
366- @test (@allocations SymEngine. pow! (a,x,x)) == 0
367-
368- # still allocates 1 (or 2)
369- @test (@allocations SymEngine. add! (a,x,y)) < (@allocations x+ y)
370- @test (@allocations SymEngine. sub! (a,x,y)) < (@allocations x- y)
371- @test (@allocations SymEngine. mul! (a,x,y)) < (@allocations x* y)
372- @test (@allocations SymEngine. div! (a,x,y)) < (@allocations x/ y)
373- @test (@allocations SymEngine. abs2! (a,x)) < (@allocations abs2 (x))
358+ if VERSION >= v " 1.9.0"
359+
360+ @vars x y
361+ a = Basic ()
362+ @testset " non-allocating(ish) methods" begin
363+ sin (x), cos (x), abs (x)
364+ x^ x, x + x, x* x, x- x, x/ x # warm up
365+
366+ @test (@allocations SymEngine. sin! (a,x)) == 0
367+ @test (@allocations SymEngine. cos! (a,x)) == 0
368+ @test (@allocations SymEngine. pow! (a,x,x)) == 0
369+
370+ # still allocates 1 (or 2)
371+ @test (@allocations SymEngine. add! (a,x,y)) < (@allocations x+ y)
372+ @test (@allocations SymEngine. sub! (a,x,y)) < (@allocations x- y)
373+ @test (@allocations SymEngine. mul! (a,x,y)) < (@allocations x* y)
374+ @test (@allocations SymEngine. div! (a,x,y)) < (@allocations x/ y)
375+ @test (@allocations SymEngine. abs2! (a,x)) < (@allocations abs2 (x))
376+ end
374377end
0 commit comments