Skip to content

Commit 9312d39

Browse files
committed
[WIP]
1 parent 98cb346 commit 9312d39

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

test/test_linesearch.jl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,28 +74,27 @@
7474
lm = LineModel(nlp, x, d)
7575

7676
al = @allocated obj(lm, 1.0)
77-
al = @allocated obj(lm, 1.0)
78-
@test al == 16
77+
@test al == (VERSION < v"1.6" ? 0 : 16)
7978

8079
al = @allocated grad!(lm, 1.0, g)
81-
@test al == 16
80+
@test al == (VERSION < v"1.6" ? 0 : 16)
8281

8382
al = @allocated objgrad!(lm, 1.0, g)
84-
@test al == 32
83+
@test al == (VERSION < v"1.6" ? 16 : 32)
8584

8685
al = @allocated hess!(lm, 1.0, g)
87-
@test al == 16
86+
@test al == (VERSION < v"1.6" ? 0 : 16)
8887

8988
h₀ = obj(lm, 0.0)
9089
slope = grad(lm, 0.0)
9190
(t, gg, ht, nbk, nbW) = armijo_wolfe(lm, h₀, slope, g)
9291
al = @allocated armijo_wolfe(lm, h₀, slope, g)
93-
@test al == 48 # ???
92+
@test al == (VERSION < v"1.6" ? nbk : 48)
9493

9594
for bk_max = 0:8
9695
(t, gg, ht, nbk, nbW) = armijo_wolfe(lm, h₀, slope, g, bk_max=bk_max)
9796
al = @allocated armijo_wolfe(lm, h₀, slope, g, bk_max=bk_max)
98-
@test al == 256 # ???
97+
@test al == (VERSION < v"1.6" ? 16 * nbk : 256)
9998
end
10099
end
101100
end

0 commit comments

Comments
 (0)