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:
parent
875f09fec1
commit
0d8a5a8131
97 changed files with 9212 additions and 1159 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue