Skip to content

Commit

Permalink
test: descriptor: fix test for MaxSatisfactionWeight
Browse files Browse the repository at this point in the history
To get the maximum size of a satisfaction for a descriptor
without considering the max sig, the parameter `use_max_sig`
should be false.
  • Loading branch information
brunoerg committed Dec 27, 2024
1 parent fc7b214 commit b29d68f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/test/descriptor_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ void DoCheck(std::string prv, std::string pub, const std::string& norm_pub, int
// We must be able to estimate the max satisfaction size for any solvable descriptor top descriptor (but combo).
const bool is_nontop_or_nonsolvable{!parse_priv->IsSolvable() || !parse_priv->GetOutputType()};
const auto max_sat_maxsig{parse_priv->MaxSatisfactionWeight(true)};
const auto max_sat_nonmaxsig{parse_priv->MaxSatisfactionWeight(true)};
const auto max_sat_nonmaxsig{parse_priv->MaxSatisfactionWeight(false)};
BOOST_CHECK(max_sat_nonmaxsig <= max_sat_maxsig);
const auto max_elems{parse_priv->MaxSatisfactionElems()};
const bool is_input_size_info_set{max_sat_maxsig && max_sat_nonmaxsig && max_elems};
BOOST_CHECK_MESSAGE(is_input_size_info_set || is_nontop_or_nonsolvable, prv);
Expand Down

0 comments on commit b29d68f

Please sign in to comment.