Skip to content

Commit e6dbc98

Browse files
authored
Merge pull request #158 from JuliaOpt/unit-test-julia-5
Unit test julia 5
2 parents 9c3d81f + ad4a566 commit e6dbc98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/changeprob.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ end
5555
betamin = rand()/2+0.5
5656
n = 100
5757
prob = 1/n*ones(n)
58-
@test risk_proba(prob, AVaR(betamin), 1:n)'*(n:-1:1) - risk_proba(prob, AVaR(betamax), 1:n)'*(n:-1:1) >= 0
58+
@test (risk_proba(prob, AVaR(betamin), 1:n)'*(n:-1:1) - risk_proba(prob, AVaR(betamax), 1:n)'*(n:-1:1))[1] >= 0.
5959
end
6060
end
6161

@@ -80,7 +80,7 @@ end
8080

8181
probaAVaR = risk_proba(prob, AVaR(beta), X)
8282

83-
@test abs(probaAVaR'*X - getobjectivevalue(m)) <= EPSILON
83+
@test abs(probaAVaR'*X - getobjectivevalue(m))[1] <= EPSILON
8484
end
8585

8686
# The convex set of probabilty distributions of AVaR_{beta} is defined by

0 commit comments

Comments
 (0)