Skip to content

Commit ff29b83

Browse files
authored
Run tests on latest stable v1 version (#159)
* Run tests on latest stable v1 version * Mark broken tests as such
1 parent 91d43bf commit ff29b83

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

.github/workflows/UnitTests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
matrix:
3535
julia_version:
3636
- "1.11"
37+
- "1"
3738
- "nightly"
3839
os:
3940
- ubuntu-latest
@@ -62,6 +63,7 @@ jobs:
6263
julia_version:
6364
- "1.10"
6465
- "1.11"
66+
- "1"
6567
- "nightly"
6668
os:
6769
- ubuntu-latest

test/runtests.jl

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,13 @@ end
146146
test_inferred(FixedSizeVector{Int}, return_type, (undef, (3,)))
147147
iter = Iterators.filter(iseven, 3:7)
148148
@test collect_as(FixedSizeArray, iter) isa return_type
149-
test_inferred(collect_as, return_type, (FixedSizeArray{Int}, iter))
150-
test_inferred(collect_as, return_type, (FixedSizeVector{Int}, iter))
149+
if VERSION >= v"1.12-"
150+
# Not inferred, see #160
151+
@test false broken=true
152+
else
153+
test_inferred(collect_as, return_type, (FixedSizeArray{Int}, iter))
154+
test_inferred(collect_as, return_type, (FixedSizeVector{Int}, iter))
155+
end
151156
arr = ([1, 2, 3],)
152157
test_inferred(FixedSizeArray, return_type, arr)
153158
test_inferred(FixedSizeVector, return_type, arr)
@@ -541,7 +546,12 @@ end
541546
@test prod(shape1) === prod(shape2) === len # meta
542547
T = FSA{elem_type,length(shape2)}
543548
test_inferred_noalloc(reshape, T, (a, shape2))
544-
test_inferred_noalloc(reshape, T, (a, shape2...))
549+
if VERSION >= v"1.12-" && length(shape2) > 2
550+
test_inferred(reshape, T, (a, shape2...))
551+
@test false broken=true # no allocations is broken, see #160
552+
else
553+
test_inferred_noalloc(reshape, T, (a, shape2...))
554+
end
545555
b = reshape(a, shape2)
546556
@test size(b) === shape2
547557
@test parent(a) === parent(b)
@@ -621,7 +631,12 @@ end
621631
iszero(dim_count) ||
622632
@test_throws DimensionMismatch collect_as(FSA{E,dim_count+1}, iterator)
623633
for T (FSA{E}, FSA{E,dim_count})
624-
test_inferred(collect_as, FSA{E,dim_count}, (T, iterator))
634+
if v"1.12-" <= VERSION < v"1.13-"
635+
# Not inferred, see #160
636+
@test false broken=true
637+
else
638+
test_inferred(collect_as, FSA{E,dim_count}, (T, iterator))
639+
end
625640
fsa = collect_as(T, iterator)
626641
@test a == fsa
627642
@test first(abstract_array_params(fsa)) <: E
@@ -635,7 +650,12 @@ end
635650
@test first(abstract_array_params(fsa)) <: E
636651
end
637652
for T (FSA{Float64}, FSA{Float64,dim_count})
638-
test_inferred(collect_as, FSA{Float64,dim_count}, (T, iterator))
653+
if v"1.12-" <= VERSION < v"1.13-"
654+
# Not inferred, see #160
655+
@test false broken=true
656+
else
657+
test_inferred(collect_as, FSA{Float64,dim_count}, (T, iterator))
658+
end
639659
fsa = collect_as(T, iterator)
640660
@test af == fsa
641661
@test first(abstract_array_params(fsa)) <: Float64

0 commit comments

Comments
 (0)