Skip to content

Commit

Permalink
Mark allocation tests broken in julia 1.4 (#117)
Browse files Browse the repository at this point in the history
* mark tests broken

* link to issue

* fix using SparseArrays
  • Loading branch information
mzgubic authored Jul 17, 2020
1 parent d735031 commit 56055d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using NamedDims
using BenchmarkTools
using SparseArrays
using Test

const testfiles = (
Expand Down
8 changes: 6 additions & 2 deletions test/wrapper_array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 56055d7

Please sign in to comment.