Skip to content

Commit ea80ac9

Browse files
committed
Better test coverage for linear algebra stuff
1 parent cf6dd6e commit ea80ac9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/linear_algebra.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ function ArrayInterface.lu_instance(x::ComponentMatrix)
99
end
1010

1111
# Helpers for dealing with adjoints and such
12-
_first_axis(x) = FlatAxis()
1312
_first_axis(x::AbstractComponentVecOrMat) = getaxes(x)[1]
1413

1514
_second_axis(x::AbstractMatrix) = FlatAxis()
@@ -38,9 +37,6 @@ for op in [:*, :\, :/]
3837
ax2 = _out_axes($op, aᵀ, B)[2]
3938
return $adj(ComponentArray(cᵀ', ax2))
4039
end
41-
function Base.$op(A::$Adj{T,<:CV}, B::CV) where {T<:Number, CV<:ComponentVector{T}}
42-
return $op(getdata(A), getdata(B))
43-
end
4440
function Base.$op(A::$Adj{T,<:CV}, B::CV) where {T<:Real, CV<:ComponentVector{T}}
4541
return $op(getdata(A), getdata(B))
4642
end

test/runtests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ end
517517
@test getaxes(ab_cd' \ cd) == (AB,)
518518
@test getaxes(cd' / ab_cd) == (FlatAxis(), AB)
519519
@test getaxes(ab' / ab_cd') == (FlatAxis(), CD)
520+
@test getaxes(ab_cd \ ab_cd) == (CD, CD)
520521
end
521522

522523
# Issue #33
@@ -536,6 +537,9 @@ end
536537
@test getaxes((s1_D * s2_D) * in2) == getaxes(s1_D * (s2_D * in2)) == (Axis(y1 = 1),)
537538
@test getaxes((s2_D * s1_D) * in1) == getaxes(s2_D * (s1_D * in1)) == (Axis(y2 = 1),)
538539
@test getaxes(out1' * (s1_D * s2_D)) == getaxes(transpose(out1) * (s1_D * s2_D)) == (FlatAxis(), Axis(u2 = 1))
540+
541+
@test ComponentArrays.ArrayInterface.lu_instance(cmat).factors isa ComponentMatrix
542+
@test ComponentArrays.ArrayInterface.parent_type(cmat) === Matrix{Float64}
539543
end
540544

541545
@testset "Plot Utilities" begin

0 commit comments

Comments
 (0)