fix: harden note-program model against corrupt tempo/division/denomination records
Reject subnormal BPM that overflows to NaN, normalize Division equality, pin a single out-of-range-denomination interpretation across all readers, flag collapsed capture windows, add offset off-view editors and structural static_asserts, collapse duplicated CLAUDE.md facts.
This commit is contained in:
@@ -41,6 +41,9 @@ static void testUnusableBpmIsRejected() {
|
||||
CHECK(!Tempo::fromBpm(-120.0).has_value());
|
||||
CHECK(!Tempo::fromBpm(std::numeric_limits<double>::quiet_NaN()).has_value());
|
||||
CHECK(!Tempo::fromBpm(std::numeric_limits<double>::infinity()).has_value());
|
||||
// Finite, positive, subnormal — but 60/bpm overflows to +inf, which turns
|
||||
// beatsToSeconds(0) into NaN downstream if let through.
|
||||
CHECK(!Tempo::fromBpm(1e-310).has_value());
|
||||
}
|
||||
|
||||
// --- Conversions ---------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user