Tests: rig fixture gives map and collider nodes a mesh; fix two test slips

Bind now refuses a meshless map-icon or hull-collider, so ShipRigTests' GLB
needs the meshes real packages carry. Not yet re-run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-16 22:05:53 +02:00
commit 46a2296ce8
2 changed files with 2 additions and 3 deletions

View file

@ -420,7 +420,6 @@ public sealed class ShipModCatalogTests : IDisposable
Assert.Contains("shield anchor shield needs three positive scale radii", Assert.Throws<InvalidOperationException>(() =>
ShipModCatalog.ReadPackage(Path.Combine(Mods, "mod.skiff", "ship.cc"))).Message);
}
Directory.Delete(Path.Combine(Mods, "mod.skiff"), true);
// The same radiator on a mesh node, and the weapon mount, shield and tractor on empty nodes, are accepted.
Directory.Delete(Path.Combine(Mods, "mod.skiff"), true);
@ -518,7 +517,7 @@ public sealed class ShipModCatalogTests : IDisposable
{""extras"":{""aetheria.id"":""none""}},{""scale"":[2,3,4],""extras"":{""aetheria.id"":""pos""}},{""scale"":[1,-1,1],""extras"":{""aetheria.id"":""neg""}},
{""scale"":[1,1,0],""extras"":{""aetheria.id"":""zero""}},{""matrix"":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],""extras"":{""aetheria.id"":""matrix""}}]}"));
var nodes = ShipModCatalog.ReadNodeIds(path);
Assert.Equal(new[] { "none", "pos" }, nodes.Where(node => node.Value.PositiveScale).Select(node => node.Key).OrderByDescending(key => key));
Assert.Equal(new[] { "none", "pos" }, nodes.Where(node => node.Value.PositiveScale).Select(node => node.Key).OrderBy(key => key));
Assert.Equal(new[] { "matrix", "neg", "zero" }, nodes.Where(node => !node.Value.PositiveScale).Select(node => node.Key).OrderBy(key => key));
}

View file

@ -201,7 +201,7 @@ public sealed class ShipRigTests : IDisposable
// arm > elbow > wrist > (an untagged bracket) > gun > gun-muzzle, with the fixture's other nodes at the root.
private static readonly Node[] RigNodes =
{
new Node("map", "map", null), new Node("collider", "collider", null), new Node("shield", "shield", null),
new Node("map", "map", null, true), new Node("collider", "collider", null, true), new Node("shield", "shield", null),
new Node("tractor", "tractor", null), new Node("thruster-port", "thruster-port", null, true),
new Node("pod", "pod", null), new Node("arm", "arm", null), new Node("elbow", "elbow", "arm"), new Node("wrist", "wrist", "elbow"),
new Node("bracket", null, "wrist"), new Node("gun", "gun", "bracket"), new Node("gun-muzzle", "gun-muzzle", "gun")