Visibility 4b: paint tests use deaf observers; the sensor record is one slot longer; the key test serializes JSON from a bare launcher
Three tests failed at 8be15c6a: TheBeamWidthIsKey12OfUnion5 read a 13-slot sensor record (14 now, key 13 added);
TheInterceptFactorKeys serialized a float4 guidance curve to JSON; ASearchPaintFromAPingerThatHasLeftCreatesNoReveal
heard the ping while its pinger stood in the zone. The paint tests (revealed-unseen, search-paint reveal, departed
pinger and departed locker) now observe with no active sensor so the reveal they pin is the paint's alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8be15c6ac1
commit
61e9fe792c
3 changed files with 6 additions and 6 deletions
|
|
@ -330,7 +330,7 @@ public sealed partial class ContactRevealTests : IDisposable
|
|||
public void APaintRevealsTheEmitterEvenUnseen()
|
||||
{
|
||||
var locker = Add(float3(0, 0, 200), new[] { "Locker" });
|
||||
var o = Add(float3(0, 0, 0), new[] { "Eye" });
|
||||
var o = Add(float3(0, 0, 0)); // deaf: no active sensor, so the reveal is the paint's alone, never the lock's emission heard
|
||||
locker.SetIff(o, true);
|
||||
locker.EntityInfoGathered[o] = 1f;
|
||||
locker.SetTarget(o);
|
||||
|
|
@ -863,7 +863,7 @@ public sealed partial class ContactRevealTests : IDisposable
|
|||
public void APaintFromAShipThatHasLeftTheZoneRevealsNothing()
|
||||
{
|
||||
var locker = Add(float3(0, 0, 200), new[] { "Locker" });
|
||||
var o = Add(float3(0, 0, 0), new[] { "Eye" });
|
||||
var o = Add(float3(0, 0, 0)); // deaf: no active sensor, so the reveal is the paint's alone, never the lock's emission heard
|
||||
locker.SetIff(o, true);
|
||||
locker.EntityInfoGathered[o] = 1f;
|
||||
locker.SetTarget(o);
|
||||
|
|
@ -890,7 +890,7 @@ public sealed partial class ContactRevealTests : IDisposable
|
|||
public void ASearchPaintRevealsThePingersSensor()
|
||||
{
|
||||
var p = Add(float3(0, 0, 100), new[] { "Eye" });
|
||||
var o = Add(float3(0, 0, 0), new[] { "Eye" });
|
||||
var o = Add(float3(0, 0, 0)); // deaf: the reveal is the paint's alone, never the ping's emission heard
|
||||
var item = p.Equipment.Single(i => i.Behaviors.Any(b => b is Sensor));
|
||||
var sensor = (Sensor) item.Behaviors.Single(b => b is Sensor);
|
||||
Tick(.01f);
|
||||
|
|
@ -916,7 +916,7 @@ public sealed partial class ContactRevealTests : IDisposable
|
|||
public void ASearchPaintFromAPingerThatHasLeftCreatesNoReveal()
|
||||
{
|
||||
var p = Add(float3(0, 0, 100), new[] { "Eye" });
|
||||
var o = Add(float3(0, 0, 0), new[] { "Eye" });
|
||||
var o = Add(float3(0, 0, 0)); // deaf: it heard nothing of the sweep while the pinger stood in the zone
|
||||
var sensor = (Sensor) p.Equipment.Single(i => i.Behaviors.Any(b => b is Sensor)).Behaviors.Single(b => b is Sensor);
|
||||
Tick(.01f);
|
||||
sensor.Ping();
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ public sealed partial class ContactRevealTests
|
|||
Assert.Equal(35, reader.ReadArrayHeader());
|
||||
for (var slot = 0; slot < 34; slot++) reader.Skip();
|
||||
Assert.Equal(3f, MessagePackSerializer.Deserialize<PerformanceStat>(ref reader, EmissionWire).Min);
|
||||
Assert.Equal(3f, JObject.Parse(JsonConvert.SerializeObject(launcher))["interceptFactor"].ToObject<PerformanceStat>().Min);
|
||||
Assert.Equal(3f, JObject.Parse(JsonConvert.SerializeObject(new LauncherData { InterceptFactor = Const(3) }))["interceptFactor"].ToObject<PerformanceStat>().Min);
|
||||
|
||||
var back = Assert.IsType<LauncherData>(MessagePackSerializer.Deserialize<BehaviorData>(bytes, EmissionWire));
|
||||
Assert.Equal(3f, back.InterceptFactor.Min);
|
||||
|
|
|
|||
|
|
@ -726,7 +726,7 @@ public sealed class PaintModeTests : IDisposable
|
|||
var reader = new MessagePackReader(bytes);
|
||||
Assert.Equal(2, reader.ReadArrayHeader());
|
||||
Assert.Equal(5, reader.ReadInt32());
|
||||
Assert.Equal(13, reader.ReadArrayHeader());
|
||||
Assert.Equal(14, reader.ReadArrayHeader());
|
||||
for (var slot = 0; slot < 12; slot++) reader.Skip();
|
||||
Assert.Equal(90f, MessagePackSerializer.Deserialize<PerformanceStat>(ref reader, WireOptions).Min);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue