acdream/tests/AcDream.Bake.Tests/ExactPayloadAliasCatalogTests.cs
Erik 9cd42417a8 feat(content): bake and read flat collision assets
Append strict collision/topology payloads to the existing prepared package so later physics cutover can drop parsed DAT graphs without adding a second mapping or changing traversal behavior. The full 2,232,170-key catalog is deterministic across worker counts, exact-byte aliased, corruption-isolated, and cancellation-safe.
2026-07-25 15:22:08 +02:00

24 lines
623 B
C#

namespace AcDream.Bake.Tests;
public sealed class ExactPayloadAliasCatalogTests
{
[Fact]
public void AliasRequiresCompleteByteEquality()
{
var catalog = new ExactPayloadAliasCatalog();
byte[] primary = [1, 2, 3, 4, 5];
catalog.Add(0x1234UL, primary);
Assert.True(catalog.TryFind(
[1, 2, 3, 4, 5],
out ulong primaryKey));
Assert.Equal(0x1234UL, primaryKey);
Assert.False(catalog.TryFind(
[1, 2, 3, 4, 4],
out _));
Assert.False(catalog.TryFind(
[1, 2, 3, 4, 5, 0],
out _));
}
}