Skip to content

Commit 9884d53

Browse files
committed
Format test/notimplemented.jl
1 parent a7eb1e3 commit 9884d53

File tree

3 files changed

+15
-22
lines changed

3 files changed

+15
-22
lines changed

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,4 @@
66
[![Build Status](https://api.cirrus-ci.com/github/JuliaSmoothOptimizers/ManualNLPModels.jl.svg)](https://cirrus-ci.com/github/JuliaSmoothOptimizers/ManualNLPModels.jl)
77
[![Coverage](https://codecov.io/gh/JuliaSmoothOptimizers/ManualNLPModels.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaSmoothOptimizers/ManualNLPModels.jl)
88

9-
This is a template/skeleton for JSO packages.
10-
It should be used for new packages, and as a reference for changes in existing packages.
11-
12-
## Things to change
13-
14-
- Project.toml: name and uuid
15-
- LICENSE.md: Check if MPL-v2 is the correct choice
9+
ManualNLPModels provides an interface for manually providing functions and derivatives to create NLPModels.

test/notimplemented.jl

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
y = zeros(0)
55

66
@testset "Minimum NLPModel throws for everything else" begin
7-
for nlp in [
8-
NLPModel(x, blah),
9-
NLPModel(x, -ones(2), ones(2), blah),
10-
]
7+
for nlp in [NLPModel(x, blah), NLPModel(x, -ones(2), ones(2), blah)]
118
@test_throws ErrorException grad(nlp, x)
129
@test_throws ErrorException hprod(nlp, x, x)
1310
@test_throws ErrorException hess(nlp, x)
@@ -38,16 +35,18 @@
3835
NLPModel(x, -ones(2), ones(2), blah; funsym => funarg),
3936
]
4037
obj(nlp, x)
41-
if funsym != :grad @test_throws ErrorException grad(nlp, x) else grad(nlp, x) end
42-
if funsym != :hprod @test_throws ErrorException hprod(nlp, x, x) else hprod(nlp, x, x) end
43-
if funsym != :hprod @test_throws ErrorException hprod(nlp, x, y, x) else hprod(nlp, x, y, x) end
44-
if funsym != :hess_coord @test_throws ErrorException hess(nlp, x) else hess(nlp, x) end
45-
if funsym != :hess_coord @test_throws ErrorException hess(nlp, x, y) else hess(nlp, x, y) end
46-
if funsym != :cons @test_throws ErrorException cons(nlp, x) else cons(nlp, x) end
47-
if funsym != :jprod @test_throws ErrorException jprod(nlp, x, x) else jprod(nlp, x, x) end
48-
if funsym != :jtprod @test_throws ErrorException jtprod(nlp, x, y) else jtprod(nlp, x, y) end
49-
if funsym != :jac_coord @test_throws ErrorException jac(nlp, x) else jac(nlp, x) end
38+
#! format: off
39+
if funsym != :grad @test_throws ErrorException grad(nlp, x) else grad(nlp, x) end
40+
if funsym != :hprod @test_throws ErrorException hprod(nlp, x, x) else hprod(nlp, x, x) end
41+
if funsym != :hprod @test_throws ErrorException hprod(nlp, x, y, x) else hprod(nlp, x, y, x) end
42+
if funsym != :hess_coord @test_throws ErrorException hess(nlp, x) else hess(nlp, x) end
43+
if funsym != :hess_coord @test_throws ErrorException hess(nlp, x, y) else hess(nlp, x, y) end
44+
if funsym != :cons @test_throws ErrorException cons(nlp, x) else cons(nlp, x) end
45+
if funsym != :jprod @test_throws ErrorException jprod(nlp, x, x) else jprod(nlp, x, x) end
46+
if funsym != :jtprod @test_throws ErrorException jtprod(nlp, x, y) else jtprod(nlp, x, y) end
47+
if funsym != :jac_coord @test_throws ErrorException jac(nlp, x) else jac(nlp, x) end
48+
#! format: on
5049
end
5150
end
5251
end
53-
end
52+
end

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ using ManualNLPModels
33
using Test
44

55
include("nlpmodelstest.jl")
6-
include("notimplemented.jl")
6+
include("notimplemented.jl")

0 commit comments

Comments
 (0)