14#ifndef OR_TOOLS_MATH_OPT_SOLVER_TESTS_CALLBACK_TESTS_H_
15#define OR_TOOLS_MATH_OPT_SOLVER_TESTS_CALLBACK_TESTS_H_
23#include "absl/container/flat_hash_set.h"
24#include "gtest/gtest.h"
26#include "ortools/math_opt/parameters.pb.h"
59 friend std::ostream&
operator<<(std::ostream& out,
76 :
public ::testing::TestWithParam<MessageCallbackTestParams> {};
110 friend std::ostream&
operator<<(std::ostream& out,
127class CallbackTest :
public ::testing::TestWithParam<CallbackTestParams> {};
SolverType
The solvers supported by MathOpt.
In SWIG mode, we don't want anything besides these top-level includes.
Parameters for CallbackTest.
friend std::ostream & operator<<(std::ostream &out, const CallbackTestParams ¶ms)
std::optional< SolveParameters > all_solutions
CallbackTestParams(SolverType solver_type, bool integer_variables, bool add_lazy_constraints, bool add_cuts, absl::flat_hash_set< CallbackEvent > supported_events, std::optional< SolveParameters > all_solutions, std::optional< SolveParameters > reaches_cut_callback)
absl::flat_hash_set< CallbackEvent > supported_events
The events that should be supported by the solver.
bool add_lazy_constraints
If the solver supports adding lazy constraints at the MIP_SOLUTION event.
bool integer_variables
True if the tests should be performed with integer variables.
bool add_cuts
If the solver supports adding cuts at the event MIP_NODE.
SolverType solver_type
The solver to test.
std::optional< SolveParameters > reaches_cut_callback
Parameters for the MessageCallbackTest suite below.
SolveParameters solve_parameters
Additional parameters to control the solve.
bool support_interrupter
True if the solver supports SolveInterrupter.
SolverType solver_type
The tested solver.
bool support_message_callback
std::string ending_substring
A sub-string expected to be found on the last log lines.
MessageCallbackTestParams(SolverType solver_type, bool support_message_callback, bool support_interrupter, bool integer_variables, std::string ending_substring, SolveParameters solve_parameters={})
bool integer_variables
True if the tests should be performed with integer variables.
friend std::ostream & operator<<(std::ostream &out, const MessageCallbackTestParams ¶ms)