Merge origin/master into ghostlight-verse/verse-grammar
Takes master's catalog pointer (GameData/Aetheria.cc) and its TestCatalog.Registry fixture path; VerseGrammar is the global scratch catalogs author (TestCatalogGlobal stays deleted: the shipped registry now has a real global, so a test-only second one would have to be authored beside it). StatResolverTests, TestCatalogTests and AetheriaStoresTests author VerseGrammar. Does not pass the suite: the catalog is master's and holds no grammar until the verse-grammar apply commit follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
3f5eb6b5c3
38 changed files with 2315 additions and 94 deletions
|
|
@ -23,10 +23,8 @@ public sealed class PiratesFactionCommandTests : IDisposable
|
|||
Directory.CreateDirectory(Path.Combine(_root, "GameData"));
|
||||
File.Copy(Path.Combine(AetherDb.FindRoot(), "GameData", "Aetheria.cc"), CatalogPath);
|
||||
// AetherDb.Open composes the process-wide registry. So the copy is stripped through a registry scoped to the shipped
|
||||
// assembly (see FireControlCut7Tests) and then given the grammar global every populated catalog must hold.
|
||||
var registry = CultDocumentRegistry.ForTypes(typeof(ItemData).Assembly.GetTypes()
|
||||
.Where(t => t is { IsAbstract: false, IsInterface: false })
|
||||
.Where(t => t.GetCustomAttribute<CultDocumentAttribute>() != null));
|
||||
// assembly (TestCatalog.Registry); the shipped catalog already holds the grammar global.
|
||||
var registry = TestCatalog.Registry();
|
||||
using (var cache = new CultCache(registry))
|
||||
{
|
||||
cache.AddBackingStore(new SingleFileMessagePackBackingStore(CatalogPath), AetheriaStores.CatalogTypes);
|
||||
|
|
@ -37,12 +35,6 @@ public sealed class PiratesFactionCommandTests : IDisposable
|
|||
Assert.True(cache.Remove(ours.Key));
|
||||
cache.FlushAsync().Wait();
|
||||
}
|
||||
using (var cache = new CultCache())
|
||||
{
|
||||
cache.AddBackingStore(new SingleFileMessagePackBackingStore(CatalogPath), AetheriaStores.CatalogTypes);
|
||||
cache.Upsert(new VerseGrammar { Revision = 1 });
|
||||
cache.FlushAsync().Wait();
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose() => Directory.Delete(_root, true);
|
||||
|
|
|
|||
Loading…
Reference in a new issue