feat(render): implement Campaign AR and terrain fidelity
This commit is contained in:
parent
99cf26e00c
commit
7a5f96ede5
368 changed files with 50611 additions and 950 deletions
|
|
@ -431,4 +431,47 @@ public sealed class OptionPageModelTests
|
|||
Assert.Equal(0, flushCount); // NO AfterApply publication on a seed
|
||||
Assert.Equal(1, gatingCount); // Apply/Reset ghosting re-evaluated
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RemoveTail_DetachesRowsAndPageNotifyOwnership()
|
||||
{
|
||||
var page = new OptionPage();
|
||||
var retained = new BoolOptionRow(false, false);
|
||||
var removed = new BoolOptionRow(false, false);
|
||||
int notifications = 0;
|
||||
page.OnOptionChanged = () => notifications++;
|
||||
page.Register(retained);
|
||||
page.Register(removed);
|
||||
|
||||
page.RemoveTail(1);
|
||||
notifications = 0;
|
||||
removed.SetCurrentValue(true);
|
||||
|
||||
Assert.Single(page.Rows);
|
||||
Assert.Same(retained, page.Rows[0]);
|
||||
Assert.Equal(0, notifications);
|
||||
Assert.False(page.Changed);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Defaults_IsSafeWhenAnEarlierRowReplacesTheDynamicTail()
|
||||
{
|
||||
var page = new OptionPage();
|
||||
int removedApplyCount = 0;
|
||||
var pack = new BoolOptionRow(
|
||||
initial: true,
|
||||
defaultValue: false,
|
||||
apply: _ => page.RemoveTail(1));
|
||||
var dynamic = new BoolOptionRow(
|
||||
initial: false,
|
||||
defaultValue: true,
|
||||
apply: _ => removedApplyCount++);
|
||||
page.Register(pack);
|
||||
page.Register(dynamic);
|
||||
|
||||
page.Defaults();
|
||||
|
||||
Assert.Single(page.Rows);
|
||||
Assert.Equal(0, removedApplyCount);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue