def METHOD_NAME(vel_accel_robustaccel, path, solver_name, i, H, g, x_ineq):
    "Case 1: only velocity and robust acceleration constraints. Only linear objective."
    vel_c, _, robust_acc_c = vel_accel_robustaccel
    path_dist = np.linspace(0, path.duration, 10 + 1)
    if solver_name == "cvxpy":
        from toppra.solverwrapper.cvxpy_solverwrapper import cvxpyWrapper
        solver = cvxpyWrapper([vel_c, robust_acc_c], path, path_dist)
    elif solver_name == "ECOS":
        from toppra.solverwrapper.ecos_solverwrapper import ecosWrapper
        solver = ecosWrapper([vel_c, robust_acc_c], path, path_dist)
    else:
        assert False
    xmin, xmax = x_ineq
    xnext_min = 0
    xnext_max = 1
    # Results from solverwrapper to test
    result = solver.solve_stagewise_optim(i, H, g, xmin, xmax, xnext_min, xnext_max)
    # Results from cvxpy, used as the actual, desired values
    ux = cvxpy.Variable(2)
    u = ux[0]
    x = ux[1]
    _, _, _, _, _, _, xbound = vel_c.compute_constraint_params(path, path_dist, 1.0)
    a, b, c, P, _, _ = robust_acc_c.compute_constraint_params(path, path_dist, 1.0)
    Di = path_dist[i + 1] - path_dist[i]
    cvx_constraints = [
        xbound[i, 0] <= x, x <= xbound[i, 1],
        x + u * 2 * Di <= xnext_max,
        x + u * 2 * Di >= xnext_min,
    ]
    for j in range(a.shape[1]):
        cvx_constraints.append(
            a[i, j] * u + b[i, j] * x + c[i, j]
            + cvxpy.norm(P[i, j].T[:, :2] * ux + P[i, j].T[:, 2]) <= 0
        )
    if not np.isnan(xmin):
        cvx_constraints.append(x <= xmax)
        cvx_constraints.append(x >= xmin)
    if H is not None:
        objective = cvxpy.Minimize(0.5 * cvxpy.quad_form(ux, H) + g * ux)
    else:
        objective = cvxpy.Minimize(g * ux)
    problem = cvxpy.Problem(objective, cvx_constraints)
    if FOUND_MOSEK:
        problem.solve(solver="MOSEK", verbose=True)
    else:
        problem.solve(solver="ECOS", verbose=True)
    if problem.status == "optimal":
        actual = np.array(ux.value).flatten()
        np.testing.assert_allclose(
            result.flatten(), actual.flatten(), atol=5e-3, rtol=1e-5)
        # X must be non-negative, always
        assert result[1] >= 0 
    else:
        assert np.all(np.isnan(result))