fix: pin the waveform arbitration in a testable predicate, close round-4 review minors
Extracts resolveWaveformClaim (core/instrument/ui/spline_edit) so the shell's node/tab/marker click resolution is unit-tested directly, not just its input geometry; folds the staged-envelope node into it; fixes comment accuracy, a cost regression, and test fidelity issues.
This commit is contained in:
@@ -619,14 +619,14 @@ static bool sameLayout(const DeckLayout& a, const DeckLayout& b) {
|
||||
|
||||
// A Spline excursion is fully reversible at the layout level: the mode forcing swaps the amp
|
||||
// and filter faces onto their wider cells and back, leaving no residue in the geometry. Driven
|
||||
// through splineActive and the editor's own forcing rule, so the deck cannot agree with a
|
||||
// forcing rule the shell does not use.
|
||||
// through the shared enforceGateUnavailableWhileDrawn helper, so the deck cannot agree with a
|
||||
// forcing rule the real callers do not use.
|
||||
static void testGateSplineGateRoundTripsToTheSameLayout() {
|
||||
PlayParams p; // Gate, all three envelopes staged
|
||||
const DeckLayout before = layoutDeck(sampleDeckGroups(p.playMode), kPad, 0, kAvailAtMinWidth);
|
||||
|
||||
p.ampSpline.mode = EnvMode::Spline;
|
||||
if (splineActive(p)) p.playMode = PlayMode::Trigger; // editor_controls' forcing, verbatim
|
||||
enforceGateUnavailableWhileDrawn(p); // the shared helper both real callers route through
|
||||
CHECK(p.playMode == PlayMode::Trigger);
|
||||
const DeckLayout drawn = layoutDeck(sampleDeckGroups(p.playMode), kPad, 0, kAvailAtMinWidth);
|
||||
// The excursion is real: the amp face's cells are strictly wider than Gate's.
|
||||
|
||||
Reference in New Issue
Block a user