Skip to content

Commit a223af5

Browse files
committed
[unittest] [eiquadprog-fast] Fix test_nonconvex
1 parent 6806f7c commit a223af5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

unittest/eiquadprog-fast.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ using namespace eiquadprog::solvers;
1010

1111
/**
1212
* solves the problem
13-
* min. x' Hess x + 2 g0' x
13+
* min. 0.5 * x' Hess x + g0' x
1414
* s.t. CE x + ce0 = 0
1515
* CI x + ci0 >= 0
1616
*/
@@ -251,8 +251,8 @@ BOOST_AUTO_TEST_CASE ( test_full )
251251

252252
// min ||x||^2
253253
// s.t.
254-
// x[0] = -1
255254
// x[0] = 1
255+
// x[0] = -1
256256

257257
BOOST_AUTO_TEST_CASE ( test_unfeasible_equalities )
258258
{
@@ -443,10 +443,10 @@ BOOST_AUTO_TEST_CASE ( test_nonconvex )
443443
Aineq(3,1) = -1.;
444444

445445
Eigen::VectorXd Bineq(4);
446-
Bineq(0) = 0.;
447-
Bineq(1) = -1.;
448-
Bineq(2) = 0.;
449-
Bineq(3) = -1.;
446+
Bineq(0) = 0.;
447+
Bineq(1) = 1.;
448+
Bineq(2) = 0.;
449+
Bineq(3) = 1.;
450450

451451
Eigen::VectorXd x(2);
452452

@@ -460,7 +460,7 @@ BOOST_AUTO_TEST_CASE ( test_nonconvex )
460460

461461
EiquadprogFast_status status = qp.solve_quadprog(Q, C, Aeq, Beq, Aineq, Bineq, x);
462462

463-
BOOST_WARN_EQUAL(status,expected);
463+
BOOST_CHECK_EQUAL(status,expected);
464464

465465
BOOST_WARN_CLOSE(qp.getObjValue(),val,1e-6);
466466

0 commit comments

Comments
 (0)