Skip to content

Commit

Permalink
Update similar test to match failing case
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub committed Nov 27, 2024
1 parent 7383d78 commit 84621de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ end
@test s isa Matrix{Float32}
@test size(s) == (2, 2)

s = similar(t, Float32, Int8(2), 2)
s = similar(t, Float32, (Int8(2), 2))
@test s isa Matrix{Float32}
@test size(s) == (2, 2)

Expand Down Expand Up @@ -1212,7 +1212,7 @@ end
# The following code defines `MyArray1/2/3` with different `BroadcastStyle`s.
# 1. `MyArray1` and `MyArray1` have `similar` defined.
# We use them to simulate `BroadcastStyle` overloading `Base.copyto!`.
# 2. `MyArray3` has no `similar` defined.
# 2. `MyArray3` has no `similar` defined.
# We use it to simulate `BroadcastStyle` overloading `Base.copy`.
# 3. Their resolved style could be summaryized as (`-` means conflict)
# | MyArray1 | MyArray2 | MyArray3 | Array
Expand Down Expand Up @@ -1308,7 +1308,7 @@ Base.BroadcastStyle(::Broadcast.ArrayStyle{MyArray2}, S::Broadcast.DefaultArrayS
f(s) = s .+= 1
f(s)
@test (@allocated f(s)) == 0

# issue #185
A = StructArray(randn(ComplexF64, 3, 3))
B = randn(ComplexF64, 3, 3)
Expand All @@ -1327,7 +1327,7 @@ Base.BroadcastStyle(::Broadcast.ArrayStyle{MyArray2}, S::Broadcast.DefaultArrayS

@testset "ambiguity check" begin
test_set = Any[StructArray([1;2+im]),
1:2,
1:2,
(1,2),
StructArray(@SArray [1;1+2im]),
(@SArray [1 2]),
Expand Down

0 comments on commit 84621de

Please sign in to comment.