From 00ac4b25ebe24fcbbb6502e10dffd8204d39e3fd Mon Sep 17 00:00:00 2001 From: Miha Zgubic Date: Wed, 31 Mar 2021 10:54:07 +0100 Subject: [PATCH 1/2] add tuples --- test/to_vec.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/to_vec.jl b/test/to_vec.jl index 18d88f2..ed63d6d 100644 --- a/test/to_vec.jl +++ b/test/to_vec.jl @@ -109,7 +109,7 @@ end @testset "Tuples" begin test_to_vec((5, 4)) - test_to_vec((5, randn(T, 5)); check_inferred = VERSION ≥ v"1.2") + test_to_vec((5, randn(T, 5)); check_inferred = VERSION ≥ v"1.2" && VERSION < v"1.6") # remove 1.6 once https://github.com/JuliaLang/julia/issues/40277 test_to_vec((randn(T, 4), randn(T, 4, 3, 2), 1); check_inferred = false) test_to_vec((5, randn(T, 4, 3, 2), UpperTriangular(randn(T, 4, 4)), 2.5); check_inferred = VERSION ≥ v"1.2") test_to_vec(((6, 5), 3, randn(T, 3, 2, 0, 1)); check_inferred = false) From a13424d01732d8eafded258b3e5958366cd8eb5a Mon Sep 17 00:00:00 2001 From: Miha Zgubic Date: Wed, 31 Mar 2021 11:33:24 +0100 Subject: [PATCH 2/2] dont check for type inference --- test/to_vec.jl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/to_vec.jl b/test/to_vec.jl index ed63d6d..59ea4ec 100644 --- a/test/to_vec.jl +++ b/test/to_vec.jl @@ -109,9 +109,11 @@ end @testset "Tuples" begin test_to_vec((5, 4)) - test_to_vec((5, randn(T, 5)); check_inferred = VERSION ≥ v"1.2" && VERSION < v"1.6") # remove 1.6 once https://github.com/JuliaLang/julia/issues/40277 + # TODO remove "< 1.6" once https://github.com/JuliaLang/julia/issues/40277 + test_to_vec((5, randn(T, 5)); check_inferred = VERSION ≥ v"1.2" && VERSION < v"1.6") test_to_vec((randn(T, 4), randn(T, 4, 3, 2), 1); check_inferred = false) - test_to_vec((5, randn(T, 4, 3, 2), UpperTriangular(randn(T, 4, 4)), 2.5); check_inferred = VERSION ≥ v"1.2") + # TODO remove "< 1.6" once https://github.com/JuliaLang/julia/issues/40277 + test_to_vec((5, randn(T, 4, 3, 2), UpperTriangular(randn(T, 4, 4)), 2.5); check_inferred = VERSION ≥ v"1.2" && VERSION < v"1.6") test_to_vec(((6, 5), 3, randn(T, 3, 2, 0, 1)); check_inferred = false) test_to_vec((DummyType(randn(T, 2, 7)), DummyType(randn(T, 3, 9)))) test_to_vec((DummyType(randn(T, 3, 2)), randn(T, 11, 8))) @@ -157,7 +159,8 @@ end @testset "Struct" begin test_to_vec(Composite{ThreeFields}(; a=10.0, b=20.0, c=30.0)) - test_to_vec(Composite{ThreeFields}(; a=10.0, b=20.0,)) + # TODO remove "< 1.6" once https://github.com/JuliaLang/julia/issues/40277 + test_to_vec(Composite{ThreeFields}(; a=10.0, b=20.0,), check_inferred = VERSION < v"1.6") test_to_vec(Composite{ThreeFields}(; a=10.0, c=30.0)) test_to_vec(Composite{ThreeFields}(; c=30.0, a=10.0, b=20.0)) end