Document the new DPF surfaces in one command set, and test the field, half-tree, and multipoint edges.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ryan Henry 2026-09-24 23:18:10 -06:00
parent 0d8a5a8131
commit 0dff6df8ed
250 changed files with 12199 additions and 1981 deletions

View file

@ -213,3 +213,17 @@ TEST(DyadicLut, Int64Edges)
EXPECT_EQ(bit(std::int64_t{-5}), 1);
EXPECT_EQ(bit(std::int64_t{5}), 0);
}
TEST(DyadicLut, RejectsAFractionalWidthThatDoesNotFit)
{
EXPECT_THROW(grotto::make_signum_lut<std::int16_t>(63), std::invalid_argument);
EXPECT_THROW(grotto::make_positive_lut<std::int64_t>(63), std::invalid_argument);
EXPECT_THROW(grotto::make_ilogb_lut<std::int16_t>(64), std::invalid_argument);
}
TEST(DyadicLut, RejectsAnEncodedValueThatDoesNotFit)
{
// clz(0) is 64. 64 << 57 does not fit in int64; 64 << 56 does.
EXPECT_THROW(grotto::make_clz_lut<std::int64_t>(57), std::overflow_error);
EXPECT_NO_THROW(grotto::make_clz_lut<std::int64_t>(56));
}