Directory: | ./ |
---|---|
File: | tests/TestA.cpp |
Date: | 2024-08-26 22:54:11 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 10 | 10 | 100.0% |
Branches: | 12 | 24 | 50.0% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | #include "TestA.hpp" | ||
2 | |||
3 | #include <Eigen/Core> | ||
4 | #include <iostream> | ||
5 | |||
6 | using namespace eiquadprog::solvers; | ||
7 | using namespace eiquadprog::tests; | ||
8 | |||
9 |
7/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
|
1 | A::A() : Q_(2, 2), C_(2), Aeq_(0, 2), Beq_(0), Aineq_(0, 2), Bineq_(0), QP_() { |
10 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | QP_.reset(2, 0, 0); |
11 | |||
12 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | Q_.setZero(); |
13 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | Q_(0, 0) = 1.0; |
14 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | Q_(1, 1) = 1.0; |
15 | |||
16 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | C_.setZero(); |
17 | |||
18 | 1 | expected_ = EIQUADPROG_FAST_OPTIMAL; | |
19 | 1 | } | |
20 | |||
21 | 1 | EiquadprogFast_status A::solve(Eigen::VectorXd &x) { | |
22 | 1 | return QP_.solve_quadprog(Q_, C_, Aeq_, Beq_, Aineq_, Bineq_, x); | |
23 | } | ||
24 |