Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
putianyi889 committed Oct 30, 2024
1 parent 83f951f commit a229a4a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/quasifill.jl
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,10 @@ function summary(io::IO, F::QuasiOnes)
print(io, "ones(")
if !isempty(F.axes)
summary(io, F.axes[1])
end
for a in tail(F.axes)
print(io, ", ")
summary(io, a)
for a in tail(F.axes)
print(io, ", ")
summary(io, a)
end
end
print(io, ")")
end
Expand All @@ -212,10 +212,10 @@ function summary(io::IO, F::QuasiZeros)
print(io, "zeros(")
if !isempty(F.axes)
summary(io, F.axes[1])
end
for a in tail(F.axes)
print(io, ", ")
summary(io, a)
for a in tail(F.axes)
print(io, ", ")
summary(io, a)
end
end
print(io, ")")
end
Expand Down
4 changes: 4 additions & 0 deletions test/test_quasifill.jl
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,10 @@ import QuasiArrays: AbstractQuasiFill
@test stringmime("text/plain",ones(Inclusion([1,2,3]))) == "ones(Inclusion([1, 2, 3]))"
@test stringmime("text/plain",zeros(Inclusion([1,2,3]))) == "zeros(Inclusion([1, 2, 3]))"
@test stringmime("text/plain",fill(2,Inclusion([1,2,3]))) == "fill(2, Inclusion([1, 2, 3]))"

@test stringmime("text/plain",QuasiOnes()) == "ones()"
@test stringmime("text/plain",QuasiZeros()) == "zeros()"
@test stringmime("text/plain",QuasiFill(2)) == "fill(2)"
end

@testset "Mul" begin
Expand Down

0 comments on commit a229a4a

Please sign in to comment.