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.
24 lines
623 B
C#
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 _));
|
|
}
|
|
}
|