@@ -21,16 +21,17 @@ function consistent_nlps(
2121 test_slack = true ,
2222 test_qn = true ,
2323 test_derivative = true ,
24+ test_counters = true ,
2425 rtol = 1.0e-8 ,
2526)
26- consistent_counters (nlps, linear_api = linear_api, reimplemented = reimplemented)
27+ test_counters && consistent_counters (nlps, linear_api = linear_api, reimplemented = reimplemented)
2728 test_meta && consistent_meta (nlps, rtol = rtol)
2829 consistent_functions (nlps, linear_api = linear_api, rtol = rtol, exclude = exclude)
29- consistent_counters (nlps, linear_api = linear_api, reimplemented = reimplemented)
30+ test_counters && consistent_counters (nlps, linear_api = linear_api, reimplemented = reimplemented)
3031 for nlp in nlps
3132 reset! (nlp)
3233 end
33- consistent_counters (nlps, linear_api = linear_api, reimplemented = reimplemented)
34+ test_counters && consistent_counters (nlps, linear_api = linear_api, reimplemented = reimplemented)
3435 if test_derivative
3536 for nlp in nlps
3637 @test length (gradient_check (nlp)) == 0
@@ -51,7 +52,7 @@ function consistent_nlps(
5152 linear_api = linear_api,
5253 exclude = [hess, hess_coord, hprod, jth_hess, jth_hess_coord, jth_hprod, ghjvprod] ∪ exclude,
5354 )
54- consistent_counters ([nlps; qnmodels], linear_api = linear_api, reimplemented = reimplemented)
55+ test_counters && consistent_counters ([nlps; qnmodels], linear_api = linear_api, reimplemented = reimplemented)
5556 end
5657
5758 if test_slack && has_inequalities (nlps[1 ])
@@ -62,7 +63,7 @@ function consistent_nlps(
6263 linear_api = linear_api,
6364 exclude = [jth_hess, jth_hess_coord, jth_hprod] ∪ exclude,
6465 )
65- consistent_counters (slack_nlps, linear_api = linear_api, reimplemented = reimplemented)
66+ test_counters && consistent_counters (slack_nlps, linear_api = linear_api, reimplemented = reimplemented)
6667 end
6768end
6869
@@ -95,7 +96,7 @@ function consistent_counters(nlps; linear_api = false, reimplemented = String[])
9596 end
9697 end
9798 end
98- if linear_api
99+ if linear_api && test_counters
99100 V = [sum_counters (nlp) for nlp in nlps]
100101 @test (reimplemented != []) | all (V .== V[1 ])
101102 for field in setdiff (collect (fieldnames (Counters)), check_fields)
0 commit comments