mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
fix compilation of unit tests
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
e29adbf304
commit
4b940bde11
|
@ -34,9 +34,8 @@ static void test1() {
|
||||||
vars.push_back(var(x, rational(2)));
|
vars.push_back(var(x, rational(2)));
|
||||||
mbo.set_objective(vars, rational(0));
|
mbo.set_objective(vars, rational(0));
|
||||||
|
|
||||||
rational value;
|
opt::inf_eps value = mbo.maximize();
|
||||||
opt::bound_type bound = mbo.maximize(value);
|
std::cout << value << "\n";
|
||||||
std::cout << bound << ": " << value << "\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// test with lower bounds
|
// test with lower bounds
|
||||||
|
@ -58,9 +57,8 @@ static void test2() {
|
||||||
vars.push_back(var(x, rational(-2)));
|
vars.push_back(var(x, rational(-2)));
|
||||||
mbo.set_objective(vars, rational(0));
|
mbo.set_objective(vars, rational(0));
|
||||||
|
|
||||||
rational value;
|
opt::inf_eps value = mbo.maximize();
|
||||||
opt::bound_type bound = mbo.maximize(value);
|
std::cout << value << "\n";
|
||||||
std::cout << bound << ": " << value << "\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// test unbounded
|
// test unbounded
|
||||||
|
@ -81,9 +79,9 @@ static void test3() {
|
||||||
vars.push_back(var(x, rational(2)));
|
vars.push_back(var(x, rational(2)));
|
||||||
mbo.set_objective(vars, rational(0));
|
mbo.set_objective(vars, rational(0));
|
||||||
|
|
||||||
rational value;
|
opt::inf_eps value = mbo.maximize();
|
||||||
opt::bound_type bound = mbo.maximize(value);
|
std::cout << value << "\n";
|
||||||
std::cout << bound << ": " << value << "\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// test strict
|
// test strict
|
||||||
|
@ -105,9 +103,8 @@ static void test4() {
|
||||||
vars.push_back(var(x, rational(2)));
|
vars.push_back(var(x, rational(2)));
|
||||||
mbo.set_objective(vars, rational(0));
|
mbo.set_objective(vars, rational(0));
|
||||||
|
|
||||||
rational value;
|
opt::inf_eps value = mbo.maximize();
|
||||||
opt::bound_type bound = mbo.maximize(value);
|
std::cout << value << "\n";
|
||||||
std::cout << bound << ": " << value << "\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// test with mix of upper and lower bounds
|
// test with mix of upper and lower bounds
|
||||||
|
|
Loading…
Reference in a new issue