One-exit tests require every sector seed to build; a generator exception fails instead of skipping the seed (cut one-exit, finding trybuild-masks-generator-crash)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0182570200
commit
9fd0fe96e7
1 changed files with 5 additions and 4 deletions
|
|
@ -438,9 +438,10 @@ public sealed class OreGeographyTests : IDisposable
|
|||
|
||||
private static Galaxy[] SectorGalaxies()
|
||||
{
|
||||
var galaxies = Galaxies(false, OneExitSeeds).ToArray();
|
||||
Assert.True(galaxies.Length >= 50, $"only {galaxies.Length} of {OneExitSeeds} sector galaxies were built");
|
||||
return galaxies;
|
||||
// Every seed builds: a generator exception here is a defect in what these tests cover, never a seed to skip.
|
||||
lock (Built)
|
||||
return Enumerable.Range(1, (int) OneExitSeeds).Select(seed =>
|
||||
Built.TryGetValue((false, (uint) seed), out var known) && known != null ? known : Built[(false, (uint) seed)] = Build(Shared, false, (uint) seed)).ToArray();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
@ -552,7 +553,7 @@ public sealed class OreGeographyTests : IDisposable
|
|||
public void DistancesAreOfTheFinalGraph()
|
||||
{
|
||||
// Built here, not shared: a galaxy another test built first would put the generator's lines under that test's coverage alone.
|
||||
foreach (var galaxy in Enumerable.Range(1, (int) OneExitSeeds).Select(seed => TryBuild(Shared, false, (uint) seed)).Where(galaxy => galaxy != null))
|
||||
foreach (var galaxy in Enumerable.Range(1, (int) OneExitSeeds).Select(seed => Build(Shared, false, (uint) seed)).ToArray())
|
||||
{
|
||||
var adjacency = AdjacencyOf(galaxy);
|
||||
for (var zone = 0; zone < adjacency.Length; zone++)
|
||||
|
|
|
|||
Loading…
Reference in a new issue