Skip to content

Commit 0f7f398

Browse files
brunoergjanus
authored andcommitted
test: descriptor: fix test for MaxSatisfactionWeight
To get the maximum size of a satisfaction for a descriptor without considering the max sig, the parameter `use_max_sig` should be false.
1 parent 39148c9 commit 0f7f398

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/descriptor_tests.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ void DoCheck(std::string prv, std::string pub, const std::string& norm_pub, int
161161
// We must be able to estimate the max satisfaction size for any solvable descriptor top descriptor (but combo).
162162
const bool is_nontop_or_nonsolvable{!parse_priv->IsSolvable() || !parse_priv->GetOutputType()};
163163
const auto max_sat_maxsig{parse_priv->MaxSatisfactionWeight(true)};
164-
const auto max_sat_nonmaxsig{parse_priv->MaxSatisfactionWeight(true)};
164+
const auto max_sat_nonmaxsig{parse_priv->MaxSatisfactionWeight(false)};
165+
BOOST_CHECK(max_sat_nonmaxsig <= max_sat_maxsig);
165166
const auto max_elems{parse_priv->MaxSatisfactionElems()};
166167
const bool is_input_size_info_set{max_sat_maxsig && max_sat_nonmaxsig && max_elems};
167168
BOOST_CHECK_MESSAGE(is_input_size_info_set || is_nontop_or_nonsolvable, prv);

0 commit comments

Comments
 (0)