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

@ -168,6 +168,19 @@ TEST(Nmod, RejectsAZeroReciprocalAndAHugeQuotient)
std::overflow_error);
}
TEST(Nmod, ScalePastTheProductWindow)
{
const auto pos = grotto::nmod(1, 200, 1, 60, 4);
EXPECT_EQ(pos.quotient, 0);
EXPECT_EQ(pos.residue, 0);
const auto neg = grotto::nmod(-1, 200, 1, 60, 4);
EXPECT_EQ(neg.quotient, -1);
EXPECT_EQ(neg.residue, 15);
EXPECT_THROW(grotto::nmod(1, 100001u, 1, 0, 4), std::invalid_argument);
}
TEST(Nmod, MostNegativeInputModuloOne)
{
const auto split = grotto::nmod(INT64_MIN, 0, 1, 0, 4);