fix: correct particle time-window reuse state
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled

This commit is contained in:
OpenAI Codex
2026-09-03 08:23:36 +08:00
parent 5dd4dbf496
commit de665212ca
8 changed files with 111 additions and 20 deletions

View File

@@ -231,6 +231,16 @@ TEST(Source, RasterArrayGpuContentIdentityExcludesRuntimeGeneration) {
EXPECT_FALSE(particle::sameFieldGpuContent(east, changed));
}
TEST(Source, RasterArrayGpuReuseConsumesNewRevision) {
const auto oldT1 = particle::OfflineFixtureParticleAdapter::load("uniform-north", 100);
auto wantedNewT0 = oldT1;
wantedNewT0.generation = 200;
const auto assignedAfterReuse = wantedNewT0;
EXPECT_TRUE(particle::sameFieldGpuContent(oldT1, wantedNewT0));
EXPECT_FALSE(particle::fieldIdentityChanged(assignedAfterReuse, wantedNewT0));
}
TEST(Source, RasterArrayTimeWindowKeepsIndependentCompatibleSnapshots) {
const auto east = particle::OfflineFixtureParticleAdapter::load("uniform-east", 11);
const auto north = particle::OfflineFixtureParticleAdapter::load("uniform-north", 12);