Skip to content

Commit 2aedfb2

Browse files
committed
Fix the final case of code coverage.
1 parent aeedccb commit 2aedfb2

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

test/plans/test_nonlinear_least_squares_plan.jl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Manifolds, Manopt, Test
1+
using Manifolds, Manopt, RecursiveArrayTools, Test
22

33
@testset "Nonlinear lest squares plan" begin
44
@testset "Test cost/residual/jacobian cases" begin
@@ -187,13 +187,21 @@ using Manifolds, Manopt, Test
187187
@test isapprox(V, get_residuals(M, dnlso, p))
188188
end
189189
end
190-
@testset "Dummy decorator pass through" begin
190+
@testset "Add_vector! on special manifolds" begin
191191
M = Hyperrectangle([0.0, 0.0], [1.0, 1.0])
192192
p = [0.5, 0.5]
193193
X = [0.0, 0.0]
194194
c = [0.1, 0.1]
195195
Manopt.add_vector!(M, X, p, c, DefaultOrthonormalBasis())
196196
@test X == c
197+
M2 = Euclidean(2)
198+
M3 = M2 × M2
199+
p3 = ArrayPartition([1.0, 0.0], [0.0, 1.0])
200+
X3 = ArrayPartition([0.0, 0.0], [0.0, 0.0])
201+
c3 = [1.0, 2.0, 3.0, 4.0]
202+
Manopt.add_vector!(M3, X3, p3, c3, DefaultOrthonormalBasis())
203+
@test X3[M3, 1] == c3[1:2]
204+
@test X3[M3, 2] == c3[3:4]
197205
end
198206
@testset "Test Change of basis" begin
199207
J = ones(2, 2)

0 commit comments

Comments
 (0)