Annotate noexcept and constexpr with HEDLEY, and add interval containment, ChaCha, and the dyadic range tables.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ryan Henry 2026-09-24 20:44:07 -06:00
parent 875f09fec1
commit 0d8a5a8131
97 changed files with 9212 additions and 1159 deletions

View file

@ -1552,3 +1552,26 @@ TEST(Beaver, RejectsBadUse)
EXPECT_THROW((void)[&] { return a.bit_mul(x, x); }(), std::invalid_argument);
(void)z;
}
TEST(Beaver, ProductExtremes)
{
const std::tuple<u64, u64, u64> cases[] = {
{0ull, 5ull, 0ull},
{7ull, 0ull, 0ull},
{~u64{0}, ~u64{0}, 1ull},
{1ull, ~u64{0}, ~u64{0}},
};
for (const auto & [a, b, want] : cases)
{
session64 s;
auto x = s.input();
auto y = s.input();
auto z = s(x * y);
Counter rng;
s.sample(rng);
s.bind(x, a, rng);
s.bind(y, b, rng);
s.evaluate();
EXPECT_EQ(s.open(z), want) << a << " * " << b;
}
}