From 56055d7b45cce76cb3a5fec4ad37b80a53cbc05b Mon Sep 17 00:00:00 2001 From: Miha Zgubic Date: Fri, 17 Jul 2020 22:23:52 +0200 Subject: [PATCH] Mark allocation tests broken in julia 1.4 (#117) * mark tests broken * link to issue * fix using SparseArrays --- test/runtests.jl | 1 + test/wrapper_array.jl | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index de9bf92..f60ee6d 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,6 @@ using NamedDims using BenchmarkTools +using SparseArrays using Test const testfiles = ( diff --git a/test/wrapper_array.jl b/test/wrapper_array.jl index d51cd32..3f2fdec 100644 --- a/test/wrapper_array.jl +++ b/test/wrapper_array.jl @@ -231,10 +231,14 @@ const cnda = NamedDimsArray([10 20; 30 40], (:x, :y)) @test 0 == @ballocated dimnames(cnda) # These tests use `@allocated` as for some reason `@ballocated` reports 1 alloc - @test 0 == @allocated NamedDimsArray(cnda, (:x, :y)) - if VERSION >= v"1.1" + if VERSION >= v"1.4" # see https://github.com/invenia/NamedDims.jl/issues/115 + @test_broken 0 == @allocated NamedDimsArray(cnda, (:x, :y)) + @test_broken 0 == @allocated NamedDimsArray(cnda, (:x, :_)) + elseif VERSION >= v"1.1" + @test 0 == @allocated NamedDimsArray(cnda, (:x, :y)) @test 0 == @allocated NamedDimsArray(cnda, (:x, :_)) else + @test 0 == @allocated NamedDimsArray(cnda, (:x, :y)) @test_broken 0 == @allocated NamedDimsArray(cnda, (:x, :_)) end